Beispiel #1
0
        public override BaseDeviceCommand BuildAck()
        {
            var r = new GTEDeviceCommand(">SAK<")
            {
                IdNum         = IdNum,
                MessageOrigin = MessageOrigin,
                MessageId     = MessageId
            };

            return(r);
        }
Beispiel #2
0
        public static BaseDeviceCommand createFrom(string command, INode node, DateTime?ExpiresOn)
        {
            BaseDeviceCommand cmd = null;

            switch (node.NodeType)
            {
            case NodeTypes.Trax:
                cmd = new GTEDeviceCommand(command, node, ExpiresOn);
                break;

            case NodeTypes.Virloc:
                cmd = new VirlocDeviceCommand(command, node, ExpiresOn);
                break;
            }

            if (cmd == null)
            {
                return(null);
            }

            return(cmd);
        }