Skip to content

Commit

Permalink
Remove reference to non-implented notify() function
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Sep 20, 2024
1 parent 57b7f8d commit cda5d5d
Showing 1 changed file with 1 addition and 47 deletions.
48 changes: 1 addition & 47 deletions docs/src/develop/plugins/server_plugin_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ app.resourcesApi.setResource(
'waypoints',
'ac3a3b2d-07e8-4f25-92bc-98e7c92f7f1a',
{
"position": {"longitude": 138.5, "latitude": -38.6},
"name": "My Waypoint",
"feature": {
"type":"Feature",
"geometry": {
Expand Down Expand Up @@ -652,52 +652,6 @@ in the specified direction and starting at the specified point.

---

### Notifications API _(proposed)_

#### `app.notify(path, value, pluginId)`

Notifications API interface method for raising, updating and clearing notifications.

- `path`: Signal K path of the notification

- `value`: A valid `Notification` object or `null` if clearing a notification.

- `pluginId` The plugin identifier.


To raise or update a for a specified path, call the method with a valid `Notification` object as the `value`.

- returns: `string` value containing the `id` of the new / updated notification.

_Example:_
```javascript
const alarmId = app.notify(
'myalarm',
{
message: 'My cutom alarm text',
state: 'alert'
},
'myAlarmPlugin'
)

// alarmId = "ac3a3b2d-07e8-4f25-92bc-98e7c92f7f1a"
```

To clear (cancel) a notification call the method with `null` as the `value`.

- returns: `void`.

_Example: Clear notification_
```javascript
const alarmId = app.notify(
'myalarm',
null,
'myAlarmPlugin'
)
```

---

### PropertyValues

The _PropertyValues_ mechanism provides a means for passing configuration type values between different components running in the server process such as plugins and input connections.
Expand Down

0 comments on commit cda5d5d

Please sign in to comment.