The Rta module contains target and configuration code for providing RTA
support
The 'Command' enum defines the available control commands, and the
'CommandPacket' structure defines the format of commands received from
the host.
All commands should send back a response, even if only to acknowledge
receipt and completion of the command. The format of the response
is defined by the 'ResponsePacket' structure.
The Rta_processCommand can be used to process commands received from a
host to call the appropriate API. Alternatively, the individual APIs can
be called if not all of the defined commands are used.
enum Rta.Command |
|
Command ids
XDCscript usage |
meta-domain |
values of type Rta.Command
const Rta.Command_READ_MASK;
const Rta.Command_WRITE_MASK;
const Rta.Command_LOGGER_OFF;
const Rta.Command_LOGGER_ON;
const Rta.Command_GET_CPU_SPEED;
const Rta.Command_RESET_LOGGER;
const Rta.Command_CHANGE_PERIOD;
typedef Int Rta_Command;
enum {
Rta_Command_READ_MASK,
Rta_Command_WRITE_MASK,
Rta_Command_LOGGER_OFF,
Rta_Command_LOGGER_ON,
Rta_Command_GET_CPU_SPEED,
Rta_Command_RESET_LOGGER,
Rta_Command_CHANGE_PERIOD
} ;
struct Rta.CommandPacket |
|
Structure of command received from host
TODO - Either the types should be changed to 32-bits, or the packet
size information should be added to the RTA XML file
XDCscript usage |
meta-domain |
var obj = new Rta.CommandPacket;
obj.arg0 = UArg ...
obj.arg1 = UArg ...
typedef struct Rta_CommandPacket {
UArg arg0;
UArg arg1;
} Rta_CommandPacket;
struct Rta.ResponsePacket |
|
Structure of response packet sent back to host
XDCscript usage |
meta-domain |
var obj = new Rta.ResponsePacket;
obj.resp0 = UArg ...
obj.resp1 = UArg ...
typedef struct Rta_ResponsePacket {
UArg resp0;
UArg resp1;
} Rta_ResponsePacket;
config Rta.A_invalidLogger // module-wide |
|
Assert if logger id in control command is invalid
XDCscript usage |
meta-domain |
msg: "A_invalidLogger: The logger id %d is invalid."
};
config Rta.E_badCommand // module-wide |
|
Error raised if Agent receives an invalid command
XDCscript usage |
meta-domain |
msg: "E_badCommand: Received invalid command, id: %d."
};
config Rta.LD_cmdRcvd // module-wide |
|
Logged when the Agent receives a command
XDCscript usage |
meta-domain |
msg: "LD_cmdRcvd: Received command: %d, arg0: 0x%x, arg1: 0x%x"
};
config Rta.LD_writeMask // module-wide |
|
Logged when a diags mask is changed
XDCscript usage |
meta-domain |
msg: "LD_writeMask: Mask addres: 0x%x, New mask value: 0x%x"
};
metaonly config Rta.common$ // module-wide |
|
Common module configuration parameters
XDCscript usage |
meta-domain |
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
Rta.acknowledgeCmd( ) // module-wide |
|
Rta.changePeriod( ) // module-wide |
|
Rta.disableLog( ) // module-wide |
|
Rta.enableLog( ) // module-wide |
|
Rta.getCpuSpeed( ) // module-wide |
|
Rta.processCommand( ) // module-wide |
|
Executes a command packet and prepares the response packet
ARGUMENTS
cmd
The CommandPacket to execute.
resp
The ResponsePacket to populate with the response.
DETAILS
This API will execute the command specified by the command packet
argument, and will store the response information in the response
packet argument.
Rta.readMask( ) // module-wide |
|
Rta.resetLog( ) // module-wide |
|
Rta.writeMask( ) // module-wide |
|
module-wide built-ins |
|
// Get this module's unique id
Bool Rta_Module_startupDone( );
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool Rta_Module_hasMask( );
// Test whether this module has a diagnostics mask
Bits16 Rta_Module_getMask( );
// Returns the diagnostics mask for this module
Void Rta_Module_setMask( Bits16 mask );
// Set the diagnostics mask for this module