83 const std::vector<int>& variablesArg,
84 const std::vector<std::shared_ptr<tcpip::Storage> >& paramsArg,
86 int contextDomainArg,
double rangeArg)
159 virtual bool wrapDouble(
const std::string& objID,
const int variable,
const double value) = 0;
160 virtual bool wrapInt(
const std::string& objID,
const int variable,
const int value) = 0;
161 virtual bool wrapString(
const std::string& objID,
const int variable,
const std::string& value) = 0;
162 virtual bool wrapStringList(
const std::string& objID,
const int variable,
const std::vector<std::string>& value) = 0;
163 virtual bool wrapDoubleList(
const std::string& objID,
const int variable,
const std::vector<double>& value) = 0;
167 virtual bool wrapStringDoublePair(
const std::string& objID,
const int variable,
const std::pair<std::string, double>& value) = 0;
168 virtual bool wrapStringPair(
const std::string& objID,
const int variable,
const std::pair<std::string, std::string>& value) = 0;
169 virtual void empty(
const std::string& ) {}
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Representation of a subscription.
double filterUpstreamDist
Upstream distance specified by the upstream distance filter.
int commandId
commandIdArg The command id of the subscription
std::set< std::string > filterVTypes
vTypes specified by the vTypes filter
double filterFieldOfVisionOpeningAngle
Opening angle (in deg) specified by the field of vision filter.
std::vector< int > filterLanes
lanes specified by the lanes filter
std::string id
The id of the object that is subscribed.
SUMOTime endTime
The end time of the subscription.
int contextDomain
The domain ID of the context.
double filterFoeDistToJunction
Foe distance to junction specified by the turn filter.
bool isVehicleToVehicleContextSubscription() const
SUMOTime beginTime
The begin time of the subscription.
std::vector< int > variables
The subscribed variables.
SVCPermissions filterVClasses
vClasses specified by the vClasses filter,
bool isVehicleToPersonContextSubscription() const
double filterDownstreamDist
Downstream distance specified by the downstream distance filter.
double filterLateralDist
Lateral distance specified by the lateral distance filter.
Subscription(int commandIdArg, const std::string &idArg, const std::vector< int > &variablesArg, const std::vector< std::shared_ptr< tcpip::Storage > > ¶msArg, SUMOTime beginTimeArg, SUMOTime endTimeArg, int contextDomainArg, double rangeArg)
Constructor.
int activeFilters
Active filters for the subscription (bitset,.
double range
The range of the context.
std::vector< std::shared_ptr< tcpip::Storage > > parameters
The parameters for the subscribed variables.
virtual bool wrapStringList(const std::string &objID, const int variable, const std::vector< std::string > &value)=0
virtual bool wrapStringDoublePair(const std::string &objID, const int variable, const std::pair< std::string, double > &value)=0
virtual bool wrapString(const std::string &objID, const int variable, const std::string &value)=0
virtual bool wrapDoubleList(const std::string &objID, const int variable, const std::vector< double > &value)=0
virtual bool wrapStringPair(const std::string &objID, const int variable, const std::pair< std::string, std::string > &value)=0
SubscriptionHandler handle
virtual bool wrapInt(const std::string &objID, const int variable, const int value)=0
virtual bool wrapPosition(const std::string &objID, const int variable, const TraCIPosition &value)=0
virtual void empty(const std::string &)
virtual bool wrapPositionVector(const std::string &objID, const int variable, const TraCIPositionVector &value)=0
virtual bool wrapDouble(const std::string &objID, const int variable, const double value)=0
bool(* SubscriptionHandler)(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
Definition of a method to be called for serving an associated commandID.
VariableWrapper(SubscriptionHandler handler=nullptr)
virtual bool wrapColor(const std::string &objID, const int variable, const TraCIColor &value)=0
virtual ~VariableWrapper()
virtual void setContext(const std::string *const)
TRACI_CONST int CMD_SUBSCRIBE_VEHICLE_CONTEXT
TRACI_CONST int CMD_GET_VEHICLE_VARIABLE
TRACI_CONST int CMD_GET_PERSON_VARIABLE
SubscriptionFilterType
Filter types for context subscriptions.
@ SUBS_FILTER_LEAD_FOLLOW
@ SUBS_FILTER_UPSTREAM_DIST
@ SUBS_FILTER_DOWNSTREAM_DIST
@ SUBS_FILTER_LATERAL_DIST
@ SUBS_FILTER_FIELD_OF_VISION
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.