コード例 #1
0
 /// <inheritdoc />
 protected BaseUnityGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                                    IMessageDeserializerStrategy <TMessageType> messageDeserializer,
                                    IMessageDispatchingStrategy <TMessageType> messageDispatcher,
                                    ICommunicationPort comPort)
     : base(connectionInfo, messageDeserializer, messageDispatcher, comPort)
 {
 }
コード例 #2
0
 /// <summary>
 /// Crates a new <see cref="BaseStringGlarduinoClient"/>.
 /// </summary>
 /// <param name="connectionInfo">The connection information for the port.</param>
 /// <param name="messageDeserializer">The message deserialization strategy.</param>
 /// <param name="messageDispatcher">The message dispatching strategy.</param>
 /// <param name="comPort">The specified communication port.</param>
 public BaseStringGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                                  IMessageDeserializerStrategy <string> messageDeserializer,
                                  IMessageDispatchingStrategy <string> messageDispatcher,
                                  ICommunicationPort comPort)
     : base(connectionInfo, messageDeserializer, messageDispatcher, comPort)
 {
 }
コード例 #3
0
 /// <inheritdoc />
 public UnityQuaternionSegmentGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                                              IMessageDeserializerStrategy <RecyclableArraySegment <Quaternion> > messageDeserializer,
                                              IMessageDispatchingStrategy <RecyclableArraySegment <Quaternion> > messageDispatcher,
                                              ICommunicationPort comPort)
     : base(connectionInfo, messageDeserializer, messageDispatcher, comPort)
 {
 }
コード例 #4
0
        /// <summary>
        /// Crates a new <see cref="BaseGlarduinoClient{TMessageType}"/>.
        /// Specifically defining the communication port.
        /// </summary>
        /// <param name="connectionInfo">The connection information for the port.</param>
        /// <param name="messageDeserializer">The message deserialization strategy.</param>
        /// <param name="messageDispatcher">The message dispatching strategy.</param>
        /// <param name="comPort">The specified communication port.</param>
        protected BaseGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                                      IMessageDeserializerStrategy <TMessageType> messageDeserializer,
                                      IMessageDispatchingStrategy <TMessageType> messageDispatcher,
                                      ICommunicationPort comPort)
        {
            ConnectionInfo        = connectionInfo ?? throw new ArgumentNullException(nameof(connectionInfo));
            MessageDeserializer   = messageDeserializer ?? throw new ArgumentNullException(nameof(messageDeserializer));
            MessageDispatcher     = messageDispatcher ?? throw new ArgumentNullException(nameof(messageDispatcher));
            InternallyManagedPort = comPort ?? throw new ArgumentNullException(nameof(comPort));

            _ConnectionEvents = new ConnectionEvents();
        }
コード例 #5
0
 /// <summary>
 /// Crates a new <see cref="BaseGlarduinoClient{TMessageType}"/>.
 /// </summary>
 /// <param name="connectionInfo">The connection information for the port.</param>
 /// <param name="messageDeserializer">The message deserialization strategy.</param>
 /// <param name="messageDispatcher">The message dispatching strategy.</param>
 protected BaseGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                               IMessageDeserializerStrategy <TMessageType> messageDeserializer,
                               IMessageDispatchingStrategy <TMessageType> messageDispatcher)
     : this(connectionInfo, messageDeserializer, messageDispatcher, new SerialPortCommunicationPortAdapter(CreateNewSerialPort(connectionInfo)))
 {
 }
コード例 #6
0
 /// <inheritdoc />
 public UnityStringGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                                   IMessageDeserializerStrategy <string> messageDeserializer,
                                   IMessageDispatchingStrategy <string> messageDispatcher)
     : base(connectionInfo, messageDeserializer, messageDispatcher)
 {
 }
コード例 #7
0
 /// <summary>
 /// Crates a new <see cref="BaseIntGlarduinoClient"/>.
 /// </summary>
 /// <param name="connectionInfo">The connection information for the port.</param>
 /// <param name="messageDeserializer">The message deserialization strategy.</param>
 /// <param name="messageDispatcher">The message dispatching strategy.</param>
 public BaseIntGlarduinoClient(ArduinoPortConnectionInfo connectionInfo,
                               IMessageDeserializerStrategy <int> messageDeserializer,
                               IMessageDispatchingStrategy <int> messageDispatcher)
     : base(connectionInfo, messageDeserializer, messageDispatcher)
 {
 }