123456789101112131415161718192021222324252627 |
- using ProjectManagementSystem.Device.Core;
- using ProjectManagementSystem.Device.Extenions;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ProjectManagementSystem.Device.Command
- {
- public class CommandAlarmLight : IDeviceCommand
- {
- private byte[] light_buffer = new byte[16] { 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10 };
- public int DeviceId { get; set; }
- public byte LightType { get; set; }
- public byte[] Serialization()
- {
- light_buffer[4] = LightType;
- light_buffer[14] = (byte)DeviceId;
- light_buffer[15] = light_buffer.XOR_Check(15);
- return light_buffer;
- }
- }
- }
|