17 #ifndef Subscription_h 18 #define Subscription_h 77 const std::vector<int>& variablesArg,
const std::vector<std::vector<unsigned char> >& paramsArg,
78 SUMOTime beginTimeArg,
SUMOTime endTimeArg,
int contextDomainArg,
double rangeArg)
117 typedef bool(*SubscriptionHandler)(
const std::string& objID,
const int variable,
VariableWrapper* wrapper);
121 virtual bool wrapDouble(
const std::string& objID,
const int variable,
const double value) = 0;
122 virtual bool wrapInt(
const std::string& objID,
const int variable,
const int value) = 0;
123 virtual bool wrapString(
const std::string& objID,
const int variable,
const std::string& value) = 0;
124 virtual bool wrapStringList(
const std::string& objID,
const int variable,
const std::vector<std::string>& value) = 0;
125 virtual bool wrapPosition(
const std::string& objID,
const int variable,
const TraCIPosition& value) = 0;
126 virtual bool wrapColor(
const std::string& objID,
const int variable,
const TraCIColor& value) = 0;
Representation of a subscription.
double range
The range of the context.
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.
virtual void setContext(const std::string &)
VariableWrapper(SubscriptionHandler handler=nullptr)
SUMOTime beginTime
The begin time of the subscription.
SUMOTime endTime
The end time of the subscription.
std::string id
The id of the object that is subscribed.
SubscriptionFilterType
Filter types for context subscriptions.
int commandId
commandIdArg The command id of the subscription
int activeFilters
Active filters for the subscription (bitset,.
int contextDomain
The domain ID of the context.
double filterDownstreamDist
Downstream distance specified by the downstream distance filter.
int filterVClasses
vClasses specified by the vClasses filter,
std::set< std::string > filterVTypes
vTypes specified by the vTypes filter
double filterUpstreamDist
Upstream distance specified by the upstream distance filter.
std::vector< std::vector< unsigned char > > parameters
The parameters for the subscribed variables.
SubscriptionHandler handle
std::vector< int > variables
The subscribed variables.
std::vector< int > filterLanes
lanes specified by the lanes filter