/// <summary> /// Send a command that sets the encryption key configuration on a PD. /// </summary> /// <param name="connectionId">Identify the connection for communicating to the device.</param> /// <param name="address">Address assigned to the device.</param> /// <param name="encryptionKeyConfiguration">Data for the encryption key configuration on the PD.</param> /// <returns><c>true</c> if successful, <c>false</c> otherwise.</returns> public async Task <bool> EncryptionKeySet(Guid connectionId, byte address, EncryptionKeyConfiguration encryptionKeyConfiguration) { var reply = await SendCommand(connectionId, new EncryptionKeySetCommand(address, encryptionKeyConfiguration)).ConfigureAwait(false); return(reply.Type == ReplyType.Ack); }
public EncryptionKeySetCommand(byte address, EncryptionKeyConfiguration encryptionKeyConfiguration) { Address = address; _encryptionKeyConfiguration = encryptionKeyConfiguration ?? throw new ArgumentNullException(nameof(encryptionKeyConfiguration)); }