BACnetStack_SendYouAre
bool BACnetStack_SendYouAre( const uint16_t vendorId, const char * modelName, const uint32_t modelNameLength, const char * serialNumber, const uint32_t serialNumberLength, const bool useDeviceIdentifier, const uint32_t deviceInstance, const bool useDeviceMACAddress, const uint8_t * deviceMACAddress, const uint32_t deviceMACAddressLength, const uint8_t * connectionString, const uint8_t connectionStringLength, const uint32_t networkPortInstance, const bool broadcast, const uint16_t destinationNetwork, const uint8_t * destinationAddress, const uint8_t destinationAddressLength, const uint8_t modelNameEncoding, const uint8_t serialNumberEncoding);Sends an unconfirmed You-Are request (cl. 16.11, unconfirmed-service-choice 14), which tells a device what its Device Identifier and/or MAC address should be.
The Device Identifier is always a Device object (cl. 16.11.3.1.4).
Validation (cl. 16.11.3-16.11.4):
- At least one of useDeviceIdentifier / useDeviceMACAddress must be true.
- deviceInstance must be <= 4194303; 4194303 is valid and directs the receiver to become an unconfigured device (cl. 19.7).
- If useDeviceMACAddress is true, a non-empty MAC must be supplied. The port it is sent from can be of any type: the target can be on a remote network (destinationNetwork) of another type, such as an MS/TP network behind a router reached from BACnet/IP. A target that uses VMAC addresses ignores the MAC (cl. 16.11.3.1.5).
Returns false if Who-Am-I / You-Are support was not compiled (STACK_OPTION_WHO_AM_I_YOU_ARE).
BACnet reference: ANSI/ASHRAE 135-2024 clause 16.11 (Who-Am-I and You-Are Services); clause 19.7 (Unconfigured Device Discovery and Address Assignment).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
vendorId, modelName, modelNameLength, serialNumber, serialNumberLength |
in | Identify the target device. |
useDeviceIdentifier |
in | If true, assign deviceInstance as the target’s Device object instance. |
deviceInstance |
in | The Device object instance to assign (<= 4194303). |
useDeviceMACAddress |
in | If true, assign deviceMACAddress (ignored by a target that uses VMAC addresses). |
deviceMACAddress, deviceMACAddressLength |
in | The MAC address to assign. |
connectionString, connectionStringLength, networkPortInstance, broadcast, destinationNetwork, destinationAddress, destinationAddressLength |
in | Send + routing parameters. |
modelNameEncoding, serialNumberEncoding |
in | The character set (cl. 20.2.9) the strings are encoded in: 0 = UTF-8, 1 = IBM/Microsoft DBCS, 2 = JIS C 6226, 3 = ISO 10646 (UCS-4), 4 = ISO 10646 (UCS-2), 5 = ISO 8859-1. |
Returns
Section titled “Returns”True if the request was sent; false on invalid parameters (see validation above) or a build failure.
Topic: Client requests. Declared in CASBACnetStackDLL.h.