Message Reference Documentation

This is the reference manual for all data flow messages needed in the ATLAS Ptolemy simulation work. The message names which appear here are those which are referred to by node specification documents.

Index

The base class from which all messages are derived:

Individual messages:


Amessage Reference

Since all messages inherit from the class Amessage, this is described first. However no instances of Amessage should ever be created, it is intended as a base class for other messages. For this reason no constructor is provided, and the default constructor will return an error if used.

Inheritance:

class Amessage: public Message

Include files

The following should be included:

#include Message.h // Ptolemy include file
#include Amessage.h // ATLAS include file

Methods

int Amessage::eventIdentifier() const

To query the unique event identifier to which this message refers. This is set by the constructor, and may not be subsequently changed.

double Amessage::creationTime() const

To query the simulation time at which this message was created. To be used for statistics gathering purposes. This is set by the constructor and may not be subsequently changed.

const Length* Amessage::length() const

To query the length of data transfer which this message represents. This returns a pointer to a constant object of type Length. This was included (rather than a simple int) following discussion because it was clear that the length will be required in different units, priincipally bits (for switches) and bytes or words (for buses).

const NodeAddress* Amessage::sourceAddress() const

To query the node address of the originator (=source = creator) of this message. This is set in the constructor and cannot be changed. The reson for this restriction is that in the presently agreed philosophy all messages only live between two nodes. If a message is to be passed on by a node then a clone is made with the address of the new creator. This returns a pointer to a constant NodeAddress object . It is assumed that all nodes will be given a unique node address at creation time.

void Amessage::destinationAddress(const NodeAddress& )

const NodeAddress* Amessage::destinationAddress() const

To set and query the node address of the intended destination for the message [Typically the source will be connected to one port of a switch, and the destination will be connected to another. The switch will, by some means, know what is connected to it and route accordingly]. The query method returns a pointer to a constant NodeAddress object.

Ptolemy required methods which are overridden in all subclasses

It is required by Ptolemy that the following methods are overidden in any class inheriting from Message (see programmers manual for details). These will therefore be provided in any subclass of Amessage.

const char* dataType() const

This is a method which Ptolemy demands you redefine and which is used to identify a message type. This returns a constant string = "classname". For example Amessage::dataType() returns "Amessage" , whereas RoiDataRequest::dataType() returns "RoiDataRequest" .

int isA( const char* typ ) const

This is a method which Ptolemy demands you redefine and which is used to identify a message type. Returns `true' if typ=="classname" or any "superclassname". For example RoiDataRequest::isA( "RoiDataRequest" ) returns "true", as does RoiDataRequest::isA( "Amessage" ) and RoiDataRequest::isA ( "Message" )

Message* Amessage::clone() const

This is a method which Ptolemy demands you redefine. To make a clone of the object and return a pointer to the base Message class.

Constructors

None.


Message name: "Data"

This message represents a block of data, typically being supplied by a Rob as a result of a DataRequest message . In general this represents all of the data for a particular event contained by the Rob.

Include files required:

#include "Message.h"
#include "Amessage.h"

Methods:

Methods provided in addition to those provided by Amessage are:

NONE

Constructors:

Data( int eventIdentifier,
     const Length& length,
     double creationTime,
     const NodeAddress& sourceAddress,
     const NodeAddress& destinationAddress
);

for initial creation of message.

Data( double creationTime,
     const NodeAddress& sourceAddress,
     const Data&
);

for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

Data( const Data& ) ;
is the simple copy constructor.


Message name: "RoiDataRequest"

This message represents a request for a block of data corresponding to an Roi as specified by the RoiDescriptor. It is typically sent to a ROB.

Include files required:

#include "Message.h"
#include "Amessage.h"

Methods

Public methods in addition to those provided by Amessage are are:

int roiIdentifier() const

Method to query the unique roi identifier of the roi request which this message represents. An roi identifier should be unique within an event.

const RoiDescriptor* roiDescriptor() const

Method to query the descriptor of the roi which this message asks for.

void targetAddress( const NodeAddress& targetAddress )

const NodeAddress* targetAddress() const

Metohds to set/query the address of the node to which the data extracted as a result of this request should be sent. This need not necessarily be the same node as the source of the RoiDataRequest message. For example a supervisor may generate roi requests but want the data sent to some other designated processor.

Constructors:

RoiDataRequest(
    int eventIdentifier,
    const Length& length,
    double creationTime,
    const NodeAddress& sourceAddress,
    const NodeAddress& destinationAddress
    int roiIdentifier,
    const RoiDescriptor& roiDescriptor,
    const NodeAddress& targetAddress
);

for initial creation of message.

RoiDataRequest(
    double creationTime,
    const NodeAddress& sourceAddress,
    const RoiDataRequest&
);

for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

RoiDataRequest( const RoiDataRequest& ) ;
is the simple copy constructor.


Message name: "DataRequest"

This message represents a request for a block of data corresponding to the entire contents of a ROB for a single event. It is typically sent to a ROB from the DAQ when collecting events

Include files required:

#include "Message.h"
#include "Amessage.h"

Methods

Public methods in addition to those provided by Amessage are are:

void targetAddress( const NodeAddress& targetAddress )

const NodeAddress* targetAddress() const

Metohds to set/query the address of the node to which the data extracted as a result of this request should be sent. This need not necessarily be the same node as the source of the RoiDataRequest message. For example a supervisor may generate roi requests but want the data sent to some other designated processor.

Constructors:

DataRequest(
    int eventIdentifier,
    const Length& length,
    double creationTime,
    const NodeAddress& sourceAddress,
    const NodeAddress& destinationAddress
    const NodeAddress& targetAddress
);

for initial creation of message.

DataRequest(
    double creationTime,
    const NodeAddress& sourceAddress,
    const DataRequest&
);

for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

DataRequest( DataRequest& ) ;
is the simple copy constructor.


Message name: "RoiData"

This message represents a block of data being supplied by a Rob as a result of it having received an RoiDataRequest message.The difference between this an a Data message is that this may in general be a subset of the data contained by a ROB.

Include files required:

#include "Message.h"
#include "Amessage.h"

Methods :

Methods provided in addition to those provided by Amessage are:

int roiIdentifier( )  const ;

Method to query the unique roi identifier of the roi request which this message represents. An roi identifier should be unique within an event.

Constructors:

RoiData( int eventIdentifier,
     const Length& length,
     double creationTime,
     const NodeAddress& sourceAddress,
     const NodeAddress& destinationAddress,
     int roiIdentifier
);

for initial creation of message.

RoiData( double creationTime,
     const NodeAddress& sourceAddress,
     const RoiData&
);

for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

RoiData( const RoiData& ) ;
is the simple copy constructor.


Message name: "DeleteData"

This message is sent to a ROB to tell it it may delete the relevant event from its data store.

Methods

Methods provided in addition to those provided by Amessage are:

int nEvents ()
operator []

To query the number of events to be deleted and access the list of event IDs.


Message name: "RobData"

This message is the same as the Data message except that it has a target address which is different from its destination address. It is used within the ROB complex to pass data from the ROB controller to the network via the ROB-out.

Include files required:

#include "Amessage.h"

Methods:

Methods provided in addition to those provided by Amessage are:

const NodeAddress* targetAddress() const
void targetAddress( const NodeAddress& targetAddress )

To query / set the node address to which this data should be forwarded.

Constructors

RobData(
     int eventIdentifier,
     const Length& length,
     double creationTime,
     const NodeAddress& sourceAddress,
     const NodeAddress& destinationAddress,
     const NodeAddress& targetAddress
)
for initial creation of message.

RobData(
     double creationTime,
     const NodeAddress& sourceAddress,
     const RobData& msg
)
for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

RobData( const RobData& msg )
is the simple copy constructor.


Message name: "RobRoiData"

This message is the same as the RoiData message except that it has a target address which is different from its destination address. It is used within the ROB complex to pass data from the ROB controller to the network via the ROB-out.

Include files required:

#include "Amessage.h"

Methods:

Methods provided in addition to those provided by Amessage are:

const NodeAddress* targetAddress() const
void targetAddress( const NodeAddress& targetAddress )

To query / set the node address to which this data should be forwarded.

Constructors

RobRoiData(
     int eventIdentifier,
     const Length& length,
     double creationTime,
     const NodeAddress& sourceAddress,
     const NodeAddress& destinationAddress,
     const NodeAddress& targetAddress
     int roiId
)
for initial creation of message.

RobRoiData(
     double creationTime,
     const NodeAddress& sourceAddress,
     const RobRoiData& msg
)
for use when a message is to be copied in order to pass it on. It is therefore necessary to set the new creator information.

RobRoiData( const RobRoiData& msg )
is the simple copy constructor.


Message name: "SteerEvent"

This is currently a standard Amessage as the only field of interest is the event ID.

Message name: "SteeringComplete"

This message informs the supervisor that the level 2 processing for the event is complete.

This is currently a standard Amessage as the only field of interest is the event ID.