doc fix, various improvements
This commit is contained in:
@ -97,9 +97,7 @@ public:
|
||||
* Used to setup the reference of the task, that executes this component
|
||||
* @param task_ Pointer to the taskIF of this task
|
||||
*/
|
||||
virtual void setTaskIF(PeriodicTaskIF* task_){
|
||||
executingTask = task_;
|
||||
};
|
||||
virtual void setTaskIF(PeriodicTaskIF* task_);
|
||||
|
||||
protected:
|
||||
/**
|
||||
@ -141,15 +139,15 @@ protected:
|
||||
* @param objectId Target object ID
|
||||
* @return
|
||||
*/
|
||||
virtual ReturnValue_t prepareCommand(CommandMessage *message,
|
||||
virtual ReturnValue_t prepareCommand(CommandMessage* message,
|
||||
uint8_t subservice, const uint8_t *tcData, size_t tcDataLen,
|
||||
uint32_t *state, object_id_t objectId) = 0;
|
||||
|
||||
/**
|
||||
* This function is implemented by child services to specify how replies
|
||||
* to a command from another software component are handled
|
||||
* to a command from another software component are handled.
|
||||
* @param reply
|
||||
* This is the reply in form of a command message.
|
||||
* This is the reply in form of a generic read-only command message.
|
||||
* @param previousCommand
|
||||
* Command_t of related command
|
||||
* @param state [out/in]
|
||||
@ -163,19 +161,26 @@ protected:
|
||||
* - @c RETURN_OK, @c EXECUTION_COMPLETE or @c NO_STEP_MESSAGE to
|
||||
* generate TC verification success
|
||||
* - @c INVALID_REPLY calls handleUnrequestedReply
|
||||
* - Anything else triggers a TC verification failure
|
||||
* - Anything else triggers a TC verification failure. If RETURN_FAILED
|
||||
* is returned and the command ID is CommandMessage::REPLY_REJECTED,
|
||||
* a failure verification message with the reason as the error parameter
|
||||
* and the initial command as failure parameter 1.
|
||||
*/
|
||||
virtual ReturnValue_t handleReply(const CommandMessage *reply,
|
||||
virtual ReturnValue_t handleReply(const CommandMessage* reply,
|
||||
Command_t previousCommand, uint32_t *state,
|
||||
CommandMessage *optionalNextCommand, object_id_t objectId,
|
||||
CommandMessage* optionalNextCommand, object_id_t objectId,
|
||||
bool *isStep) = 0;
|
||||
|
||||
/**
|
||||
* This function can be overidden to handle unrequested reply,
|
||||
* when the reply sender ID is unknown or is not found is the command map.
|
||||
* The default implementation will clear the command message and all
|
||||
* its contents.
|
||||
* @param reply
|
||||
* Reply which is non-const so the default implementation can clear the
|
||||
* message.
|
||||
*/
|
||||
virtual void handleUnrequestedReply(CommandMessage *reply);
|
||||
virtual void handleUnrequestedReply(CommandMessage* reply);
|
||||
|
||||
virtual void doPeriodicOperation();
|
||||
|
||||
@ -195,6 +200,9 @@ protected:
|
||||
FIFO<store_address_t, 3> fifo;
|
||||
};
|
||||
|
||||
using CommandMapIter = FixedMap<MessageQueueId_t,
|
||||
CommandingServiceBase::CommandInfo>::Iterator;
|
||||
|
||||
const uint16_t apid;
|
||||
|
||||
const uint8_t service;
|
||||
@ -263,21 +271,21 @@ protected:
|
||||
ReturnValue_t sendTmPacket(uint8_t subservice, SerializeIF* content,
|
||||
SerializeIF* header = nullptr);
|
||||
|
||||
void checkAndExecuteFifo(
|
||||
typename FixedMap<MessageQueueId_t, CommandInfo>::Iterator *iter);
|
||||
void checkAndExecuteFifo(CommandMapIter iter);
|
||||
|
||||
private:
|
||||
using CommandMapIter = FixedMap<MessageQueueId_t,
|
||||
CommandingServiceBase::CommandInfo>::Iterator;
|
||||
|
||||
/**
|
||||
* This method handles internal execution of a command,
|
||||
* once it has been started by @sa{startExecution()} in the Request Queue handler.
|
||||
* It handles replies generated by the devices and relayed by the specific service implementation.
|
||||
* This means that it determines further course of action depending on the return values specified
|
||||
* in the service implementation.
|
||||
* once it has been started by @sa{startExecution()} in the request
|
||||
* queue handler.
|
||||
* It handles replies generated by the devices and relayed by the specific
|
||||
* service implementation. This means that it determines further course of
|
||||
* action depending on the return values specified in the service
|
||||
* implementation.
|
||||
* This includes the generation of TC verification messages. Note that
|
||||
* the static framework object ID @c VerificationReporter::messageReceiver needs to be set.
|
||||
* the static framework object ID @c VerificationReporter::messageReceiver
|
||||
* needs to be set.
|
||||
* - TM[1,5] Step Successs
|
||||
* - TM[1,6] Step Failure
|
||||
* - TM[1,7] Completion Success
|
||||
@ -298,12 +306,11 @@ private:
|
||||
|
||||
void acceptPacket(uint8_t reportId, TcPacketStored* packet);
|
||||
|
||||
void startExecution(TcPacketStored *storedPacket,
|
||||
typename FixedMap<MessageQueueId_t, CommandInfo>::Iterator *iter);
|
||||
void startExecution(TcPacketStored *storedPacket, CommandMapIter iter);
|
||||
|
||||
void handleCommandMessage(CommandMessage& reply);
|
||||
void handleCommandMessage(CommandMessage* reply);
|
||||
void handleReplyHandlerResult(ReturnValue_t result, CommandMapIter iter,
|
||||
CommandMessage& nextCommand,CommandMessage& reply, bool& isStep);
|
||||
CommandMessage* nextCommand, CommandMessage* reply, bool& isStep);
|
||||
|
||||
void checkTimeout();
|
||||
};
|
||||
|
Reference in New Issue
Block a user