Skip to main content

Gateway Registry

ThingsIX gateway registry

Functions

gateways

function gateways(bytes32 id) external view returns (struct IGatewayRegistry.Gateway)

Retrieve gateway details. Throws UnknownGatewayErr when there is no gateway onboaded that is identified by the given id.

Parameters

NameTypeDescription
idbytes32ThingsIX gateway identifier

Return Values

NameTypeDescription
[0]struct IGatewayRegistry.Gatewaygateway gateway details

gatewayCount

function gatewayCount(address owner) external view returns (uint256)

Number of registered gateways for the given owner.

Parameters

NameTypeDescription
owneraddressgateway owner

Return Values

NameTypeDescription
[0]uint256number number of gateways owned by the given owner

gatewaysPaged

function gatewaysPaged(address owner, uint256 start, uint256 end) external view returns (struct IGatewayRegistry.Gateway[])

Batch of owned gateways for the given owner. Throws an UnknownGatewayErr when the given range is invalid.

Parameters

NameTypeDescription
owneraddressaddress of the gateway owner
startuint256start index (inclusive)
enduint256last index (exclusive)

Return Values

NameTypeDescription
[0]struct IGatewayRegistry.Gateway[]batch of gateways for the given owner in the given range

Events

GatewayUpdated

event GatewayUpdated(bytes32 gatewayId)

raised when a new gateway is updated in the registry.

GatewayTransferred

event GatewayTransferred(bytes32 gatewayId, address oldOwner, address newOwner)

raised when a new gateway is transferred

GatewayOffboarded

event GatewayOffboarded(bytes32 gatewayId)

raised when a new gateway is removed from the registry.

GatewayOnboarded

event GatewayOnboarded(bytes32 gatewayId, address owner)

raised when a new gateway is added to the registry.

Structs

Gateway

struct Gateway {
bytes32 id;
uint8 version;
address owner;
uint8 antennaGain;
uint8 frequencyPlan;
int64 location;
uint8 altitude;
}