Locations¶
Locations are a hierarchical representation of the different places in a vessel, or shore-side.
For example, an entire Deck, a Fire zone, a Cabin, etc.
Locations can be as granular as decided, for example Drawers and Cabinets.
Integration¶
The Location Services offers some messages that can be published, as well as some events that another services can consume to keep up to date with new and updated locations.
First of all, we need a reference to the Locations.Application.Contracts
project, as it's shown below:
XML | |
---|---|
Messages¶
From your module, you are able to request two different Location's actions, wait for their response and then continue:
Create or update a Location:
You can set the ParentLocationId
while you are creating the Location. Take
into account that the ParentLocation
must be created before its "child".
Events¶
On the other hand, you can consume the different Location's events and perform the actions you need to do in your project.
Location Updated:
This event has all the Location's information, including LocationNamePath
.
This property contains the entire Location hierarchy, from the root Location to
the Location itself.
Note
LocationUpdated
event is published when a Location is updated but
also when a Location is created.