public void PushSingleton(CConnectionFrames.CFrame frame_singleton) { CConnectionFrames _connection_frames_temp = _connection_frames; if (_connection_frames_temp != null) { _connection_frames_temp.PushSingleton(frame_singleton); } }
public void PushFrame(CConnectionFrames.CFrame frame) { CConnectionFrames _connection_frames_temp = _connection_frames; if (_connection_frames_temp != null) { _connection_frames_temp.PushFrame(frame); } }
private void _FrameProcessor(CConnectionFrames.CFrame frame) { ECommand _command = (ECommand)frame.Command; byte[] _bytes_buffer = frame.BytesFrame; int _buffer_length = _bytes_buffer.Length; Console.WriteLine(BitConverter.ToString(_bytes_buffer)); if (_command == ECommand.DEBUG_STRING) { Console.Write(Encoding.GetEncoding(1251).GetString(_bytes_buffer)); } else if (_command == ECommand.SETTINGS_DATA && _buffer_length == (2 + 2 + 1 + (2 * 2))) { int _offset = 0; ushort _delay = BitConverter.ToUInt16(_bytes_buffer, _offset); _offset += 2; ushort _period_offset = BitConverter.ToUInt16(_bytes_buffer, _offset); _offset += 2; byte _duty_cycle1 = _bytes_buffer[_offset++]; byte _duty_cycle2 = _bytes_buffer[_offset++], _phase2 = _bytes_buffer[_offset++]; byte _duty_cycle3 = _bytes_buffer[_offset++], _phase3 = _bytes_buffer[_offset++]; _settings.SetParams(_delay, _period_offset, _duty_cycle1, _duty_cycle2, _phase2, _duty_cycle3, _phase3); } else if (_command == ECommand.SETTINGS_SAVE && _buffer_length == 0) { } }