S
steve
Hi guys,
New to Perl and even newer to hashes, this is what I'm trying to
do......
I have different messages arriving at different interfaces, I want to
capture each message and save it away for later processing.
The messages are identified by the interface(IntFace) they arrived on,
the message id(MsgId), and the content of the message (a stream of hex
).
The attempts so far have been around a hash with a counter that saves
the IntFace, the MsgId and then I try to save the hex stream. On
retrieving the stream all I get in the number of bytes in the stream
rather than the actual contents.
$INCLUDE::mainConstants::RxMsgCounter++;
$INCLUDE::mainConstants::RxMessageHash{InterfaceId}[$INCLUDE::mainConstants::RxMsgCounter]
= $localIntfId;
$INCLUDE::mainConstants::RxMessageHash{MessageId}[$INCLUDE::mainConstants::RxMsgCounter]
= $localMsgId;
$INCLUDE::mainConstants::RxMessage{Message}[$INCLUDE::mainConstants::RxMsgCounter]
= \@localFrame;
@localmsg =
$INCLUDE::mainConstants::RxMessage{Message}[$INCLUDE::mainConstants::RxMsgCounter];
INCLUDE::Log::debugTrace "message array is - @localmsg";
Any help on how to do this so I get the hex back would be great
Regards
Steve
New to Perl and even newer to hashes, this is what I'm trying to
do......
I have different messages arriving at different interfaces, I want to
capture each message and save it away for later processing.
The messages are identified by the interface(IntFace) they arrived on,
the message id(MsgId), and the content of the message (a stream of hex
).
The attempts so far have been around a hash with a counter that saves
the IntFace, the MsgId and then I try to save the hex stream. On
retrieving the stream all I get in the number of bytes in the stream
rather than the actual contents.
$INCLUDE::mainConstants::RxMsgCounter++;
$INCLUDE::mainConstants::RxMessageHash{InterfaceId}[$INCLUDE::mainConstants::RxMsgCounter]
= $localIntfId;
$INCLUDE::mainConstants::RxMessageHash{MessageId}[$INCLUDE::mainConstants::RxMsgCounter]
= $localMsgId;
$INCLUDE::mainConstants::RxMessage{Message}[$INCLUDE::mainConstants::RxMsgCounter]
= \@localFrame;
@localmsg =
$INCLUDE::mainConstants::RxMessage{Message}[$INCLUDE::mainConstants::RxMsgCounter];
INCLUDE::Log::debugTrace "message array is - @localmsg";
Any help on how to do this so I get the hex back would be great
Regards
Steve