コード例 #1
0
        public IMTSOutMessageEvent GetFuelMessageForMTS(DeviceDetails deviceDetails, FuelRequestType fuelRequest)
        {
            IMTSOutMessageEvent fuelEventMessage;

            if (fuelRequest == FuelRequestType.GatewayRequest)
            {
                fuelEventMessage = new SendGatewayRequestEvent()
                {
                    Context = new EventContext
                    {
                        AssetUid   = deviceDetails.AssetUid.ToString(),
                        DeviceId   = deviceDetails.SerialNumber,
                        DeviceType = deviceDetails.DeviceType,
                        DeviceUid  = deviceDetails.DeviceUid.ToString(),
                        EventUtc   = DateTime.UtcNow,
                        MessageUid = Guid.NewGuid().ToString()
                    },
                    GatewayMessageTypes = new List <GatewayMessageType>()
                    {
                        GatewayMessageType.FuelEngine
                    }
                }
            }
            ;
            else
            {
                fuelEventMessage = new SendVehicleBusRequestEvent
                {
                    Context = new EventContext
                    {
                        AssetUid   = deviceDetails.AssetUid.ToString(),
                        DeviceId   = deviceDetails.SerialNumber,
                        DeviceType = deviceDetails.DeviceType,
                        DeviceUid  = deviceDetails.DeviceUid.ToString(),
                        EventUtc   = DateTime.UtcNow,
                        MessageUid = Guid.NewGuid().ToString()
                    },
                    GatewayMessageTypes = new List <VehicleBusMessageType>()
                    {
                        VehicleBusMessageType.FuelEngine
                    }
                }
            };
            return(fuelEventMessage);
        }
コード例 #2
0
        public IMTSOutMessageEvent GetTPMSRequestMessageForMTS(DeviceDetails deviceDetails)
        {
            IMTSOutMessageEvent ecmInfoMessage = new SendVehicleBusRequestEvent
            {
                Context = new VSS.VisionLink.Interfaces.Events.Commands.Models.EventContext
                {
                    AssetUid   = deviceDetails.AssetUid.ToString(),
                    DeviceId   = deviceDetails.SerialNumber,
                    DeviceType = deviceDetails.DeviceType,
                    DeviceUid  = deviceDetails.DeviceUid.ToString(),
                    EventUtc   = DateTime.UtcNow,
                    MessageUid = Guid.NewGuid().ToString()
                },
                GatewayMessageTypes = new List <VehicleBusMessageType>()
                {
                    VehicleBusMessageType.TireMonitoring
                }
            };

            return(ecmInfoMessage);
        }
コード例 #3
0
        public IMTSOutMessageEvent GetECMRequestMessageForMTS(DeviceDetails deviceDetails)
        {
            IMTSOutMessageEvent ecmInfoMessage = new SendVehicleBusRequestEvent
            {
                Context = new EventContext
                {
                    AssetUid   = deviceDetails.AssetUid.ToString(),
                    DeviceId   = deviceDetails.SerialNumber,
                    DeviceType = deviceDetails.DeviceType,
                    DeviceUid  = deviceDetails.DeviceUid.ToString(),
                    EventUtc   = DateTime.UtcNow,
                    MessageUid = Guid.NewGuid().ToString()
                },
                GatewayMessageTypes = new List <VehicleBusMessageType>()
                {
                    VehicleBusMessageType.ECMInfo
                }
            };

            return(ecmInfoMessage);
        }