Exemplo n.º 1
0
        private static byte[] ConnectionReleaseReq(string objectuuid)
        {
            var x = BuilderClass.BuildIodReleaseBlockReq(BuilderClass.iod_ar_custom_uuid);
            var y = BuilderClass.BuildRpcNrdDataReq(objectuuid, BuilderClass.rpc_ControllerInterface, BuilderClass.rpc_activity_uuid, x, "00 01");

            return(y.HexToByteArray());
        }
Exemplo n.º 2
0
        private static byte[] ImplicitReadReq(string objectuuid, string filter, string slot2, string subslot2, string rpc_activity_uuid)
        {
            // vaiireren von: io_device interface uuid;  und die variablen // "00 09", "00 01", "00 00", "00 01"
            var x = BuilderClass.BuildIODHeader(BuilderClass.iod_ar_null_uuid, BuilderClass.iod_ar_null_uuid, filter, "00 09", slot2, subslot2);
            var y = BuilderClass.BuildRpcNrdDataReq(objectuuid, BuilderClass.rpc_DeviceInterface, rpc_activity_uuid, x, "00 05");

            return(y.HexToByteArray());
        }
Exemplo n.º 3
0
        private static byte[] ReadReq(string objectuuid, string index, string slot2, string subslot2)
        {
            // TODO
            // vaiireren von: io_device interface uuid;  und die variablen
            var x = BuilderClass.BuildIODHeader(BuilderClass.iod_ar_custom_uuid, BuilderClass.iod_targetar_custom_uuid, index, "00 09", slot2, subslot2);
            var y = BuilderClass.BuildRpcNrdDataReq(objectuuid, BuilderClass.rpc_DeviceInterface, BuilderClass.rpc_activity_uuid, x, "00 02");

            return(y.HexToByteArray());
        }
Exemplo n.º 4
0
        private static byte[] ConnectRequest(string objectuuid, string initiator_mac)
        {
            initiator_mac = initiator_mac.HexShort();
            //var activity_UUID = BuilderClass.rpc_activity_uuid;
            var x = BuilderClass.BuildArBlockReq(BuilderClass.iod_ar_custom_uuid, initiator_mac, BuilderClass.iod_ar_initiatorobject_uuid);
            var y = BuilderClass.BuildRpcNrdDataReq(objectuuid, BuilderClass.rpc_ControllerInterface, BuilderClass.rpc_activity_uuid, x, "00 00");

            return(y.HexToByteArray());
        }
Exemplo n.º 5
0
        private static byte[] WriteReq(string objectuuid, string content)
        {
            var im0 = new Im1Block()
            {
                header = "0021 xxxx 01 00".HexShort(),
                body   = content.PadRight(32, ' ').StringToHex() + "".PadLeft(22, ' ').StringToHex()
            };
            var x2 = im0.Build();
            var x  = BuilderClass.BuildIODHeaderContent(BuilderClass.iod_ar_custom_uuid, BuilderClass.iod_ar_null_uuid, BuilderClass.index_im1, "00 08", "00 00", "00 01", x2);

            var y = BuilderClass.BuildRpcNrdDataReq(objectuuid, BuilderClass.rpc_DeviceInterface, BuilderClass.rpc_activity_uuidim1w, x, "00 03");

            return(y.HexToByteArray());
        }