83 const std::vector<int>& variablesArg,
84 const std::vector<std::shared_ptr<tcpip::Storage> >& paramsArg,
86 int contextDomainArg,
double rangeArg)
159 virtual bool wrapConnectionVector(
const std::string& objID,
const int variable,
const std::vector<TraCIConnection>& value) = 0;
160 virtual bool wrapDouble(
const std::string& objID,
const int variable,
const double value) = 0;
161 virtual bool wrapInt(
const std::string& objID,
const int variable,
const int value) = 0;
162 virtual bool wrapString(
const std::string& objID,
const int variable,
const std::string& value) = 0;
163 virtual bool wrapStringList(
const std::string& objID,
const int variable,
const std::vector<std::string>& value) = 0;
164 virtual bool wrapDoubleList(
const std::string& objID,
const int variable,
const std::vector<double>& value) = 0;
168 virtual bool wrapStringDoublePair(
const std::string& objID,
const int variable,
const std::pair<std::string, double>& value) = 0;
169 virtual bool wrapStringDoublePairList(
const std::string& objID,
const int variable,
const std::vector<std::pair<std::string, double> >& value) = 0;
170 virtual bool wrapStringPair(
const std::string& objID,
const int variable,
const std::pair<std::string, std::string>& value) = 0;
171 virtual bool wrapIntPair(
const std::string& objID,
const int variable,
const std::pair<int, int>& value) = 0;
173 virtual bool wrapReservationVector(
const std::string& objID,
const int variable,
const std::vector<TraCIReservation>& value) = 0;
174 virtual bool wrapLogicVector(
const std::string& objID,
const int variable,
const std::vector<TraCILogic>& value) = 0;
175 virtual bool wrapLinkVectorVector(
const std::string& objID,
const int variable,
const std::vector<std::vector<TraCILink> >& value) = 0;
177 virtual bool wrapJunctionFoeVector(
const std::string& objID,
const int variable,
const std::vector<TraCIJunctionFoe>& value) = 0;
178 virtual bool wrapNextStopDataVector(
const std::string& objID,
const int variable,
const std::vector<TraCINextStopData>& value) = 0;
179 virtual bool wrapVehicleDataVector(
const std::string& objID,
const int variable,
const std::vector<TraCIVehicleData>& value) = 0;
180 virtual bool wrapBestLanesDataVector(
const std::string& objID,
const int variable,
const std::vector<TraCIBestLanesData>& value) = 0;
181 virtual bool wrapNextTLSDataVector(
const std::string& objID,
const int variable,
const std::vector<TraCINextTLSData>& value) = 0;
182 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 wrapLogicVector(const std::string &objID, const int variable, const std::vector< TraCILogic > &value)=0
virtual bool wrapNextStopDataVector(const std::string &objID, const int variable, const std::vector< TraCINextStopData > &value)=0
virtual bool wrapNextTLSDataVector(const std::string &objID, const int variable, const std::vector< TraCINextTLSData > &value)=0
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 bool wrapStage(const std::string &objID, const int variable, const TraCIStage &value)=0
virtual bool wrapStringDoublePairList(const std::string &objID, const int variable, const std::vector< std::pair< std::string, double > > &value)=0
virtual bool wrapVehicleDataVector(const std::string &objID, const int variable, const std::vector< TraCIVehicleData > &value)=0
virtual void empty(const std::string &)
virtual bool wrapReservationVector(const std::string &objID, const int variable, const std::vector< TraCIReservation > &value)=0
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.
virtual bool wrapBestLanesDataVector(const std::string &objID, const int variable, const std::vector< TraCIBestLanesData > &value)=0
virtual bool wrapJunctionFoeVector(const std::string &objID, const int variable, const std::vector< TraCIJunctionFoe > &value)=0
virtual bool wrapLinkVectorVector(const std::string &objID, const int variable, const std::vector< std::vector< TraCILink > > &value)=0
VariableWrapper(SubscriptionHandler handler=nullptr)
virtual bool wrapSignalConstraintVector(const std::string &objID, const int variable, const std::vector< TraCISignalConstraint > &value)=0
virtual bool wrapColor(const std::string &objID, const int variable, const TraCIColor &value)=0
virtual ~VariableWrapper()
virtual bool wrapIntPair(const std::string &objID, const int variable, const std::pair< int, int > &value)=0
virtual bool wrapConnectionVector(const std::string &objID, const int variable, const std::vector< TraCIConnection > &value)=0
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.