38 const std::string
id = inputStorage.
readString();
41 if (!libsumo::ChargingStation::handleVariable(
id, variable, &server, &inputStorage)) {
56 std::string warning =
"";
73 StoHelp::readCompound(inputStorage, 2,
"A compound object of size 2 is needed for setting a parameter.");
74 const std::string name =
StoHelp::readTypedString(inputStorage,
"The name of the parameter must be given as a string.");
76 libsumo::ChargingStation::setParameter(
id, name,
value);
84 libsumo::ChargingStation::setChargingPower(
id,
value);
92 libsumo::ChargingStation::setEfficiency(
id,
value);
100 libsumo::ChargingStation::setChargeDelay(
id,
value);
105 libsumo::ChargingStation::setChargeInTransit(
id,
value != 0);
const std::string invalid_return< std::string >::value
std::string toHex(const T i, std::streamsize numDigits=0)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa6: Get ChargingStation Variable).
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc6: Change ChargingStation State).
TraCI server used to control sumo by a remote TraCI client.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
tcpip::Storage & getWrapperStorage()
void initWrapper(const int domainID, const int variable, const std::string &objID)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static int readCompound(tcpip::Storage &ret, int expectedSize=-1, const std::string &error="")
static int readTypedInt(tcpip::Storage &ret, const std::string &error="")
static std::string readTypedString(tcpip::Storage &ret, const std::string &error="")
An error which allows to continue.
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int CMD_GET_CHARGINGSTATION_VARIABLE
TRACI_CONST int VAR_CS_POWER
TRACI_CONST int VAR_CS_CHARGE_DELAY
TRACI_CONST int VAR_CS_EFFICIENCY
TRACI_CONST int VAR_CS_CHARGE_IN_TRANSIT
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int CMD_SET_CHARGINGSTATION_VARIABLE
TRACI_CONST int RESPONSE_GET_CHARGINGSTATION_VARIABLE