コード例 #1
0
ファイル: HarpCommand.cs プロジェクト: bonsai-rx/harp
 /// <summary>
 /// Returns a <see cref="HarpMessage"/> read command for the specified address and payload type.
 /// </summary>
 /// <param name="address">The address of the register to read.</param>
 /// <param name="payloadType">The type of data available in the register.</param>
 /// <returns>
 /// A valid <see cref="HarpMessage"/> read command with the specified address and payload type.
 /// </returns>
 public static HarpMessage Read(int address, PayloadType payloadType)
 {
     return(HarpMessage.FromPayload(address, MessageType.Read, payloadType));
 }
コード例 #2
0
ファイル: HarpCommand.cs プロジェクト: bonsai-rx/harp
 /// <summary>
 /// Returns a <see cref="HarpMessage"/> write command with the specified address, and payload.
 /// </summary>
 /// <param name="address">The address of the register to which the Harp message refers to.</param>
 /// <param name="payloadType">The type of data available in the message payload.</param>
 /// <param name="payload">The raw binary representation of the payload data.</param>
 /// <returns>
 /// A valid <see cref="HarpMessage"/> write command with the specified address and payload.
 /// </returns>
 public static HarpMessage Write(int address, PayloadType payloadType, params byte[] payload)
 {
     return(HarpMessage.FromPayload(address, MessageType.Write, payloadType, payload));
 }