mapUser method

Future<String> mapUser(
  1. String uid,
  2. String secretKey
)

Returns node ID

Implementation

Future<String> mapUser(String uid, String secretKey) async {
  final deviceSecretRequest = CmdSetUserMapping()
    ..userID = uid
    ..secretKey = secretKey;
  final msgType = RMakerConfigMsgType.TypeCmdSetUserMapping;
  final payload = RMakerConfigPayload()
    ..msg = msgType
    ..cmdSetUserMapping = deviceSecretRequest;

  final data = await _device.sendDataToCustomEndPoint(
      AppConstants.HANDLER_RM_USER_MAPPING, payload.writeToBuffer());

  return _processDetails(data);
}