Events
What is an Event?
The Events Layer adds the ability to attach timestamps to individual Items. Events can be set for any time point and can be used by other features as a method for storing custom time points.
Shared Events
The Events layer also provides the Shared Events table for storing group-wide events. Set the shared flag to true on a given Event Action to specify a shared event.
Table Breakdown
Table Name: events
Table Scope: item.serial
Name | Type | Example | Description |
event_name | name | createtime | The name of the event. |
event_time | time_point_sec | 2020-05-30T10:58:05 | The time of the event. |
locked | bool | false | The locked state of the event. |
Create a New Event
Create a new Event with the newevent()
action.
Required Authority: group.manager
Action Parameters
Name | Type | Example | Description |
serial | uint64_t | 5 | The serial number of the Item to assign the event. |
event_name | name | minttime | The name of the event. |
custom_event_time | optional<time_point_sec> | 2020-05-30T10:58:05 | The custom event time to set for the event. |
shared | bool | true | Create shared event if true. |
Examples
Update an Event Time
Update an event timestamp with the seteventtime()
action.
Required Authority: group.manager
Action Parameters
Name | Type | Example | Description |
serial | uint64_t | 5 | The serial number of the Item to affect. |
event_name | name | cooldown | The name of the event to affect. |
new_event_time | time_point_sec | 2020-05-30T10:58:05 | The new event time to set for the event. |
shared | bool | true | Update shared event if true. |
Examples
Lock an Event
Lock an event with the lockevent()
action.
Required Authority: group.manager
Action Parameters
Name | Type | Example | Description |
serial | uint64_t | 5 | The serial number of the Item with the event to lock. |
event_name | name | cooldown | The name of the event to lock. |
shared | bool | false | Lock a shared event if true. |
Examples
Remove an Event
Remove an event with the rmvevent()
action.
Required Authority: group.manager
Action Parameters
Name | Type | Example | Description |
serial | uint64_t | 5 | The serial number of the Item with the event to remove. |
event_name | name | cooldown | The name of the event to remove. |
shared | bool | true | Remove a shared event if true. |
Examples
Last updated