Skip to main content

Mapper Registry

Public interface for the ThingsIX PoC mapper registry.

Functions​

frequencyPlans​

function frequencyPlans(uint8 plan) external returns (string)

frequencyPlans returns the name for the given plan id. It the given plan is unknown an empty string is returned.

Parameters​

NameTypeDescription
planuint8frequency plan id

mappers​

function mappers(bytes32 id) external view returns (struct IMapperRegistry.Mapper)

Retrieve mapper details by its id.

mappersCount​

function mappersCount() external view returns (uint256)

Total number of mappers registered

mappersPaged​

function mappersPaged(uint256 start, uint256 end) external view returns (struct IMapperRegistry.Mapper[])

Return set of mappers within the range [start, end).

Parameters​

NameTypeDescription
startuint256start index (inclusive)
enduint256end index (exclusive)

mappersRegistered​

function mappersRegistered() external view returns (uint256)

Number of mappers registered by ThingsIX.

mappersOnboarded​

function mappersOnboarded() external view returns (uint256)

Number of mappers onboarded by their owners.

mappersOwned​

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

Number of mappers the given owner has.

Parameters​

NameTypeDescription
owneraddressaddress to retrieve the number of onboarded gateways

Return Values​

NameTypeDescription
[0]uint256number of gateways the given owner has onboarded

mappersOwnedPaged​

function mappersOwnedPaged(address owner, uint256 start, uint256 end) external view returns (struct IMapperRegistry.Mapper[])

Return collection of mappers the given owner has in the range [start, end).

Parameters​

NameTypeDescription
owneraddressaccount of the owner to retrieve mappers for
startuint256start index (inclusive)
enduint256end index (exclusive)

Events​

MapperRegistered​

event MapperRegistered(bytes32 mapperId)

raised when a mapper is registered

MapperRemoved​

event MapperRemoved(bytes32 mapperId)

raised when a mapper is removed from the registry by ThingsIX

MapperOnboarded​

event MapperOnboarded(bytes32 mapperId, address owner)

raised when a mapper is onboarded by its new owner

MapperClaimed​

event MapperClaimed(bytes32 mapperId)

raised when a mapper is claimed by ThingsIX

FrequencyPlanAdded​

event FrequencyPlanAdded(uint8)

FrequencyPlanAdded raised when a new frequency plan is added

FrequencyPlanRemoved​

event FrequencyPlanRemoved(uint8)

FrequencyPlanRemoved raised when a frequency plan is removed

MapperTransferred​

event MapperTransferred(bytes32 mapperId, address oldOwner, address newOwner)

raised when a mapper is transferred to a new owner

MapperInactive​

event MapperInactive(bytes32 mapperId)

raised when a mapper is deactivated

MapperActive​

event MapperActive(bytes32 mapperId)

raised when a mapper is activated

Structs​

Mapper​

struct Mapper {
bytes32 id;
uint16 revision;
address owner;
uint8 frequencyPlan;
bool active;
}