WIP: somethings wrong.. #19
@ -34,29 +34,17 @@ ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
|
|||||||
ReturnValue_t Service2DeviceAccess::getMessageQueueAndObject(
|
ReturnValue_t Service2DeviceAccess::getMessageQueueAndObject(
|
||||||
uint8_t subservice, const uint8_t* tcData, size_t tcDataLen,
|
uint8_t subservice, const uint8_t* tcData, size_t tcDataLen,
|
||||||
MessageQueueId_t* id, object_id_t* objectId) {
|
MessageQueueId_t* id, object_id_t* objectId) {
|
||||||
ReturnValue_t result = checkAndAcquireTargetID(objectId,tcData,tcDataLen);
|
if(tcDataLen < sizeof(object_id_t)) {
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
return CommandingServiceBase::INVALID_TC;
|
||||||
return result;
|
}
|
||||||
}
|
SerializeAdapter::deSerialize(objectId, &tcData,
|
||||||
|
&tcDataLen, SerializeIF::Endianness::BIG);
|
||||||
|
|
||||||
result = checkInterfaceAndAcquireMessageQueue(id,objectId);
|
ReturnValue_t result = checkInterfaceAndAcquireMessageQueue(id,objectId);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Service2DeviceAccess::checkAndAcquireTargetID(
|
|
||||||
object_id_t* objectIdToSet, const uint8_t* tcData, size_t tcDataLen) {
|
|
||||||
if(SerializeAdapter::deSerialize(objectIdToSet, &tcData,
|
|
||||||
&tcDataLen, SerializeIF::Endianness::BIG) != RETURN_OK) {
|
|
||||||
sif::error << "Service 2: Target ID not found. ID: " <<
|
|
||||||
std::hex << objectIdToSet ;
|
|
||||||
return CommandingServiceBase::INVALID_TC;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t * messageQueueToSet, object_id_t *objectId) {
|
MessageQueueId_t * messageQueueToSet, object_id_t *objectId) {
|
||||||
DeviceHandlerIF* possibleTarget =
|
DeviceHandlerIF* possibleTarget =
|
||||||
|
@ -73,8 +73,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
void sendWiretappingTm(CommandMessage* reply,uint8_t subservice);
|
void sendWiretappingTm(CommandMessage* reply,uint8_t subservice);
|
||||||
|
|
||||||
ReturnValue_t checkAndAcquireTargetID(object_id_t* objectIdToSet,
|
|
||||||
const uint8_t* tcData, size_t tcDataLen);
|
|
||||||
ReturnValue_t checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId);
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user