Service SemaphoreUtils
from semaphore-utils import SemaphoreUtils
Port Name | Location | Protocol | Interfaces |
---|---|---|---|
ip | local | SemaphoreUtilsInterface |
List of Available Interfaces
SemaphoreUtilsInterface
Operation Name | Input Type | Output Type | Faults | Description |
---|---|---|---|---|
acquire | SemaphoreRequest | bool | - | Acquires permits from a semaphore. If there exists no semaphore with the given ".name", "acquire" creates a new semaphore with 0 permits with that name. The operation returns a response when a new permit is released (see operation "release"). The default behaviour when value ".permits" is absent is to acquire one permit. |
release | SemaphoreRequest | bool | - | Releases permits to a semaphore. If there exists no semaphore with the given ".name", "release" creates a new semaphore with that name and as many permits as indicated in ".permits". The default behaviour when value ".permits" is absent is to release one permit. |
Types
SemaphoreRequest:
Type Declaration
void { permits[0,1]: int // the optional number of permits to release/acquire name[1,1]: string // }