module xdc.runtime.Rta

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 ... ]
C synopsis target-domain sourced in xdc/runtime/Rta.xdc
#include <xdc/runtime/Rta.h>
Functions
Void 
Void 
Void 
Void 
Void 
Void 
Void 
Void 
Void 
Rta_writeMask// (Rta_ResponsePacket *resp, UArg addr, UArg val);
Functions common to all target modules
Typedefs
typedef Int
typedef struct
typedef struct
Constants
extern const Assert_Id 
extern const String 
extern const String 
extern const Error_Id 
extern const Log_Event 
extern const Log_Event 
 
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

C synopsis target-domain
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

C synopsis target-domain
typedef struct Rta_CommandPacket {
    Rta_Command cmdId;
    UArg arg0;
    UArg arg1;
} Rta_CommandPacket;
 
 
struct Rta_ResponsePacket

Structure of response packet sent back to host

C synopsis target-domain
typedef struct Rta_ResponsePacket {
    Rta_Command cmdId;
    UArg resp0;
    UArg resp1;
} Rta_ResponsePacket;
 
 
config Rta_A_invalidLogger  // module-wide

Assert if logger id in control command is invalid

C synopsis target-domain
extern const Assert_Id Rta_A_invalidLogger;
 
 
config Rta_E_badCommand  // module-wide

Error raised if Agent receives an invalid command

C synopsis target-domain
extern const Error_Id Rta_E_badCommand;
 
 
config Rta_LD_cmdRcvd  // module-wide

Logged when the Agent receives a command

C synopsis target-domain
extern const Log_Event Rta_LD_cmdRcvd;
 
 
config Rta_LD_writeMask  // module-wide

Logged when a diags mask is changed

C synopsis target-domain
extern const Log_Event Rta_LD_writeMask;
 
 
config Rta_controlTransportClassName  // module-wide

The name of the xdc.rta.IControlTransport class to use

C synopsis target-domain
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

C synopsis target-domain
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
C synopsis target-domain
Void Rta_acknowledgeCmd(Rta_ResponsePacket *resp);
 
 
Rta_changePeriod()  // module-wide
C synopsis target-domain
Void Rta_changePeriod(Rta_ResponsePacket *resp, UArg period);
 
 
Rta_disableLog()  // module-wide
C synopsis target-domain
Void Rta_disableLog(Rta_ResponsePacket *resp, UArg log);
 
 
Rta_enableLog()  // module-wide
C synopsis target-domain
Void Rta_enableLog(Rta_ResponsePacket *resp, UArg log);
 
 
Rta_getCpuSpeed()  // module-wide
C synopsis target-domain
Void Rta_getCpuSpeed(Rta_ResponsePacket *resp);
 
 
Rta_processCommand()  // module-wide

Executes a command packet and prepares the response packet

C synopsis target-domain
Void Rta_processCommand(Rta_CommandPacket *cmd, Rta_ResponsePacket *resp);
 
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
C synopsis target-domain
Void Rta_readMask(Rta_ResponsePacket *resp, UArg addr);
 
 
Rta_resetLog()  // module-wide
C synopsis target-domain
Void Rta_resetLog(Rta_ResponsePacket *resp, UArg log);
 
 
Rta_writeMask()  // module-wide
C synopsis target-domain
Void Rta_writeMask(Rta_ResponsePacket *resp, UArg addr, UArg val);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId Rta_Module_id();
// Get this module's unique id
 
Bool Rta_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle Rta_Module_heap();
// 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
 
XDCscript usage meta-domain sourced in xdc/runtime/Rta.xdc
var Rta = xdc.useModule('xdc.runtime.Rta');
module-wide constants & types
    values of type Rta.Command// Command ids
        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;
 
        obj.cmdId = Rta.Command  ...
        obj.arg0 = UArg  ...
        obj.arg1 = UArg  ...
 
        obj.cmdId = Rta.Command  ...
        obj.resp0 = UArg  ...
        obj.resp1 = UArg  ...
module-wide config parameters
        msg: "A_invalidLogger: The logger id %d is invalid."
    };
        msg: "E_badCommand: Received invalid command, id: %d."
    };
        mask: Diags.USER2,
        msg: "LD_cmdRcvd: Received command: %d, arg0: 0x%x, arg1: 0x%x"
    };
        mask: Diags.USER2,
        msg: "LD_writeMask: Mask addres: 0x%x, New mask value: 0x%x"
    };
 
 
 
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;
    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

XDCscript usage meta-domain
var obj = new Rta.CommandPacket;
 
    obj.cmdId = Rta.Command  ...
    obj.arg0 = UArg  ...
    obj.arg1 = UArg  ...
 
C SYNOPSIS
 
struct Rta.ResponsePacket

Structure of response packet sent back to host

XDCscript usage meta-domain
var obj = new Rta.ResponsePacket;
 
    obj.cmdId = Rta.Command  ...
    obj.resp0 = UArg  ...
    obj.resp1 = UArg  ...
 
C SYNOPSIS
 
config Rta.A_invalidLogger  // module-wide

Assert if logger id in control command is invalid

XDCscript usage meta-domain
Rta.A_invalidLogger = Assert.Desc {
    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

XDCscript usage meta-domain
Rta.E_badCommand = Error.Desc {
    msg: "E_badCommand: Received invalid command, id: %d."
};
 
C SYNOPSIS
 
config Rta.LD_cmdRcvd  // module-wide

Logged when the Agent receives a command

XDCscript usage meta-domain
Rta.LD_cmdRcvd = Log.EventDesc {
    mask: Diags.USER2,
    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

XDCscript usage meta-domain
Rta.LD_writeMask = Log.EventDesc {
    mask: Diags.USER2,
    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

XDCscript usage meta-domain
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

XDCscript usage meta-domain
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

XDCscript usage meta-domain
Rta.common$ = Types.Common$ undefined;
 
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 Thu, 01 Mar 2012 16:58:40 GMT