getConnectionPoolQRData method

String getConnectionPoolQRData(
  1. String poolId
)

Generates a configuration command string that can be encoded into a QR code. The QR code data contains the necessary information to configure the device with the provided connection pool ID when scanned.

poolId - A valid 4-character hexadecimal connection pool ID.

Returns the QR code data string, or an empty string if the ID is invalid.

Implementation

String getConnectionPoolQRData(String poolId) {
  if (!isValidHexId(poolId)) {
    return '';
  }
  final directInputKeys = _getDirectInputKeysFromHexId(poolId);
  return '@MENU_OPTO@ZZ@BBP@${directInputKeys.join('@')}@ZZ@OTPO_UNEM@';
}