 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef Subscription_h
17 #define Subscription_h
79 const std::vector<int>& variablesArg,
80 const std::vector<std::vector<unsigned char>>& paramsArg,
82 int contextDomainArg,
double rangeArg)
140 virtual bool wrapDouble(
const std::string& objID,
const int variable,
const double value) = 0;
141 virtual bool wrapInt(
const std::string& objID,
const int variable,
const int value) = 0;
142 virtual bool wrapString(
const std::string& objID,
const int variable,
const std::string& value) = 0;
143 virtual bool wrapStringList(
const std::string& objID,
const int variable,
const std::vector<std::string>& value) = 0;
Subscription(int commandIdArg, const std::string &idArg, const std::vector< int > &variablesArg, const std::vector< std::vector< unsigned char >> ¶msArg, SUMOTime beginTimeArg, SUMOTime endTimeArg, int contextDomainArg, double rangeArg)
Constructor.
int activeFilters
Active filters for the subscription (bitset,.
double filterUpstreamDist
Upstream distance specified by the upstream distance filter.
virtual bool wrapString(const std::string &objID, const int variable, const std::string &value)=0
double filterDownstreamDist
Downstream distance specified by the downstream distance filter.
std::vector< int > filterLanes
lanes specified by the lanes filter
std::string id
The id of the object that is subscribed.
virtual bool wrapRoadPosition(const std::string &objID, const int variable, const TraCIRoadPosition &value)=0
SUMOTime endTime
The end time of the subscription.
std::vector< int > variables
The subscribed variables.
virtual bool wrapColor(const std::string &objID, const int variable, const TraCIColor &value)=0
std::vector< std::vector< unsigned char > > parameters
The parameters for the subscribed variables.
int commandId
commandIdArg The command id of the subscription
virtual bool wrapDouble(const std::string &objID, const int variable, const double value)=0
@ SUBS_FILTER_UPSTREAM_DIST
Representation of a subscription.
double filterFieldOfVisionOpeningAngle
Opening angle (in deg) specified by the field of vision filter.
SubscriptionFilterType
Filter types for context subscriptions.
VariableWrapper(SubscriptionHandler handler=nullptr)
virtual bool wrapStringList(const std::string &objID, const int variable, const std::vector< std::string > &value)=0
int filterVClasses
vClasses specified by the vClasses filter,
bool(* SubscriptionHandler)(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition of a method to be called for serving an associated commandID.
SUMOTime beginTime
The begin time of the subscription.
double range
The range of the context.
virtual bool wrapInt(const std::string &objID, const int variable, const int value)=0
@ SUBS_FILTER_DOWNSTREAM_DIST
@ SUBS_FILTER_FIELD_OF_VISION
virtual void setContext(const std::string &)
An edgeId, position and laneIndex.
int contextDomain
The domain ID of the context.
@ SUBS_FILTER_LEAD_FOLLOW
virtual bool wrapPosition(const std::string &objID, const int variable, const TraCIPosition &value)=0
SubscriptionHandler handle
std::set< std::string > filterVTypes
vTypes specified by the vTypes filter