示例#1
0
        public override void BuildAsciiCommand(int unitId, string commandCode, int?address, int?length,
                                               object[] values, TimerValueFormat timerValueFormat)
        {
            AbstractASCIIMessage message =
                ASCIIMessageFactory.GetMessageType(unitId, commandCode, address, length, values);

            m_messageToPLC = message.GetMessage(timerValueFormat);
        }
示例#2
0
 public override void DisAssembleAsciiResult(string receivedMessage, int unitId, string commandCode,
                                             int?address, int?length, List <List <byte> > dataRequestBytes, TimerValueFormat timerValueFormat)
 {
     if (receivedMessage != null)
     {
         AbstractASCIIMessage message =
             ASCIIMessageFactory.GetMessageType(unitId, commandCode, address, length, null);
         message.TimerValueFormat = timerValueFormat;
         m_messageFromPLC         = message.GetMessage(receivedMessage);
     }
 }