The scIGPMessage class.
The addresses must comprise the HThread number correctly! A scIGPMessage breaks down as follows. All messages have a header
Register ('R') messages:
The memory read requests do have no extra (empty and obsolete) bytes for the requested contents. Rather, they set the size to 4, and MessageFeatures_t::ReplyLength delivers the reply length information to the memory, and the sent-back message has the corresponding length. This feature make a message CreateReadMessageReply obsolete: if the length is 4, it is a read message.
Neural ('N') messages The messages are sent by scHThread and received by scHThread. More precisely, from AbstractNeurer to AbstractNeurer. The content depends on the message type Type 0 (a spike)
That is, the mimimum length is four 32-bit words. The message is created by the sender scGridPoint, and deleted by the receiver scGridPoint
Public Member Functions | |
int32_t | BufferContent_Get (int index) |
Returns the index-th element in the buffer. | |
void | BufferContent_Set (int index, int32_t C) |
Sets the index-th element of the buffer to C. | |
int16_t | DelayTime_Get (void) |
Return MessageFeatures_t::Length of the message (Total, including the header) | |
void | DelayTime_Set (int16_t T) |
Set the type of the message in the buffer to MessageFeatures_t::Type T. | |
ClusterAddress_t | DestinationAddress_Get (void) |
Return the ClusterAddress_t address of the destination in the message. | |
void | DestinationAddress_Set (ClusterAddress_t CA) |
Set the destination address to ClusterAddress_t address CA. | |
MessageFeatures_t | FeatureWord_Get (void) |
Returns the features word of the message. | |
void | FeatureWord_Set (MessageFeatures_t &F) |
Sets the features word to F. More... | |
uint32_t | Header3Address_Get (void) |
Set the ReplyTo (or source) address to ClusterAddress_t CA. | |
void | Header3Address_Set (uint32_t A) |
Set the Header3 address to ClusterAddress_t address CA. | |
int | Length_Get (void) |
Return MessageFeatures_t::Length of the message (Total, including the header) | |
int | ReplyLength_Get (void) |
Get from the 'memory read' message the requested reply length MessageFeatures_t::ReplyLength. More... | |
ClusterAddress_t | ReplyToAddress_Get (void) |
Return the ClusterAddress_t ReplyTo (or source) address. | |
void | ReplyToAddress_Set (ClusterAddress_t CA) |
Set the ReplyTo address to ClusterAddress_t address CA. | |
scIGPMessage (void) | |
Implements the messages for the autonomously communicating grid point functionality. More... | |
string | StringOfBufferContent_Get (int index) |
return content of the index-th element in hexadecimal string form | |
IGPMessageType | Type_Get (void) |
Returns MessageFeatures_t::Type. | |
void | Type_Set (IGPMessageType &T) |
Set the type of the message in the buffer to MessageFeatures_t::Type T. | |
scIGPMessage::scIGPMessage | ( | void | ) |
Implements the messages for the autonomously communicating grid point functionality.
The messages comprise the destination address and the reply-to address. When assembling the messages, the sending gridpoint fills out the address fields properly, so the bottom layer can forward the message autonomously to its destination. That is, the bottom layer serves as a router, and akin to the computer network routers, has the right to change the addressing mode in function of the actual conditions.
|
inline |
Sets the features word to F.
F | the new features word MessageFeatures_t |
|
inline |
Get from the 'memory read' message the requested reply length MessageFeatures_t::ReplyLength.