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.
[
more ... ]
#include <xdc/runtime/Rta.h>
Functions |
Void | |
Void | |
Void | |
Void | |
Void | |
Void | |
Void | |
Void | |
Void | |
Functions common to all target modules |
|
|
Typedefs |
typedef Int | |
typedef struct | |
typedef struct | |
Constants |
| |
extern const String | |
extern const String | |
| |
| |
| |
DETAILS
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
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,
Rta_Command_START_TX,
Rta_Command_STOP_TX
} ;
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
typedef struct Rta_CommandPacket {
UArg arg0;
UArg arg1;
} Rta_CommandPacket;
struct Rta_ResponsePacket |
|
Structure of response packet sent back to host
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
config Rta_E_badCommand // module-wide |
|
Error raised if Agent receives an invalid command
config Rta_LD_cmdRcvd // module-wide |
|
Logged when the Agent receives a command
config Rta_LD_writeMask // module-wide |
|
Logged when a diags mask is changed
config Rta_controlTransportClassName // module-wide |
|
The name of the xdc.rta.IControlTransport class to use
extern const String Rta_controlTransportClassName;
DETAILS
The class specified here can be used on the host for communicating with
this target application to send control commands and receive responses.
config Rta_dataTransportClassName // module-wide |
|
The name of the xdc.rta.IDataTransport class to use
extern const String Rta_dataTransportClassName;
DETAILS
The class specified here can be used on the host for reading RTA data
from this target application.
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
var Rta = xdc.useModule('xdc.runtime.Rta');
module-wide constants & types
module-wide config parameters
msg: "A_invalidLogger: The logger id %d is invalid."
};
msg: "E_badCommand: Received invalid command, id: %d."
};
msg: "LD_cmdRcvd: Received command: %d, arg0: 0x%x, arg1: 0x%x"
};
msg: "LD_writeMask: Mask addres: 0x%x, New mask value: 0x%x"
};
enum Rta.Command |
|
Command ids
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;
const Rta.Command_START_TX;
const Rta.Command_STOP_TX;
C SYNOPSIS
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
var obj = new Rta.CommandPacket;
obj.arg0 = UArg ...
obj.arg1 = UArg ...
C SYNOPSIS
struct Rta.ResponsePacket |
|
Structure of response packet sent back to host
var obj = new Rta.ResponsePacket;
obj.resp0 = UArg ...
obj.resp1 = UArg ...
C SYNOPSIS
config Rta.A_invalidLogger // module-wide |
|
Assert if logger id in control command is invalid
msg: "A_invalidLogger: The logger id %d is invalid."
};
C SYNOPSIS
config Rta.E_badCommand // module-wide |
|
Error raised if Agent receives an invalid command
msg: "E_badCommand: Received invalid command, id: %d."
};
C SYNOPSIS
config Rta.LD_cmdRcvd // module-wide |
|
Logged when the Agent receives a command
msg: "LD_cmdRcvd: Received command: %d, arg0: 0x%x, arg1: 0x%x"
};
C SYNOPSIS
config Rta.LD_writeMask // module-wide |
|
Logged when a diags mask is changed
msg: "LD_writeMask: Mask addres: 0x%x, New mask value: 0x%x"
};
C SYNOPSIS
config Rta.controlTransportClassName // module-wide |
|
The name of the xdc.rta.IControlTransport class to use
Rta.controlTransportClassName = String "";
DETAILS
The class specified here can be used on the host for communicating with
this target application to send control commands and receive responses.
C SYNOPSIS
config Rta.dataTransportClassName // module-wide |
|
The name of the xdc.rta.IDataTransport class to use
Rta.dataTransportClassName = String "";
DETAILS
The class specified here can be used on the host for reading RTA data
from this target application.
C SYNOPSIS
metaonly config Rta.common$ // module-wide |
|
Common module configuration parameters
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.
generated on Tue, 13 Oct 2015 04:14:19 GMT