Data Event Formats - Locks
Summary
CWMS needs a message structure to notify clients of lock-related events.
Opinions
Opinion 1
Summary: Use the structures described below for lock-related events.
All messages will be published to the appropriate REALTIME_OPS topic. Subscribers can set up appropriate filters to receive the desired messages.
Author: Mike Perryman
Locks
Only values necessary to uniquely identify a lock (“type”, “lock_id”), and values necessary to minimally describe a lock (“project_id”) are required for LockCreated and LockUpdated messages.
LockCreated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LockCreated |
|
Example LockCreated message
{
"type": "lock_created",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
},
"project_id": "Green LD2",
"volume_per_lockage": 42.4,
"volume_unit": "acft",
"length": 600.0,
"width": 110.0,
"minimum_draft": 9.0,
"normal_lift": 28.0,
"maximum_lift": 35.0,
"unit": "ft",
"gate_type": "Single Chamber"
}
LockUpdated Message Structure
Message Type |
Structure |
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LockUpdated |
|
Example LockUpdated message
{
"type": "lock_updated",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
},
"project_id": "Green LD2",
"volume_per_lockage": 42.4,
"volume_unit": "acft",
"length": 600.0,
"width": 110.0,
"minimum_draft": 9.0,
"normal_lift": 28.0,
"maximum_lift": 35.0,
"unit": "ft",
"gate_type": "Single Chamber"
}
Only values necessary to uniquely identify a lock (“type”, “lock_id”) are required for LockDeleted messages.
LockDeleted Message Structure
Message Type |
Structure |
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
LockDeleted |
|
Example LockDeleted message
{
"type": "lock_deleted",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
}
}
Gate Types Table
Gate Type |
Description |
|---|---|
Single Chamber |
A lock gate system with a single chamber |
Land Side Main |
The main chamber on the land side of the lock |
Land Side Aux |
An auxiliary chamber on the land side of the lock |
River Side Main |
The main chamber on the river side of the lock |
River Side Aux |
An auxiliary chamber on the river side of the lock |
Lockages
Only values necessary to uniquely identify a lockage (“type”, “lock_id”, “date_time”) are required for LockageCreated, LockageUpdated, and LockageDeleted messages.
LockageCreated Message Structure
Message Type |
Structure |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LockageCreated |
|
Example LockageCreated message
{
"type": "lockage_created",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
},
"date_time": 1788971820000,
"boat_count": 1,
"barge_count": 4,
"tonnage": 10000.0,
"upbound": true,
"emptying": false,
"notes": "Lockage completed successfully."
}
LockageUpdated Message Structure
Message Type |
Structure |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LockageUpdated |
|
Example LockageUpdated message
{
"type": "lockage_updated",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
},
"date_time": 1788971820000,
"boat_count": 1,
"barge_count": 4,
"tonnage": 10000.0,
"upbound": true,
"emptying": false,
"notes": "Lockage completed successfully."
}
LockageDeleted Message Structure
Message Type |
Structure |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LockageDeleted |
|
Example LockageDeleted message
{
"type": "lockage_deleted",
"lock_id": {
"office_id": "SWT",
"name": "Green LD2-Lock"
},
"date_time": 1788971820000
}
Decision Status
Status: request for comments