gRPC Service Registry
A gateway of Industrial Asset Hub hosts the gRPC service registry as a container inside the Asset Gateway application. The Backend services of Industrial Asset Hub communicate with the Asset links through the Asset Gateway. All these drivers implement one or more gRPC services, e.g. asset discovery or firmware update. The Asset Gateway can query a specific Asset link via the gRPC service registry to get the address to connect to the Asset link.
gRPC Service Registry connectivity
All the Asset links, e.g. the Asset link SIMATIC will register its gRPC endpoint information along with its service schema Uri into the gRPC service registry. With the help of the gRPC service registry, all the agents can query the endpoint information of any Asset link and communicate with those drivers.
API Description
RegistryApi
=========================================== The Services Definition
RegisterService
rpc RegisterService(RegisterServiceRequest) RegisterServiceResponse
Possible return values - OK
UnregisterService
rpc UnregisterService(UnregisterServiceRequest) UnregisterServiceResponse
Possible return values - OK - NOT_FOUND - service with the provided key was not registered
QueryRegisteredServices
rpc QueryRegisteredServices(QueryRegisteredServicesRequest) QueryRegisteredServicesResponse
Possible return values - OK
Messages
QueryRegisteredServicesRequest {#queryregisteredservicesrequest}
Field | Type | Description |
---|---|---|
filter | ServiceInfoFilter | none |
QueryRegisteredServicesResponse {#queryregisteredservicesresponse}
Field | Type | Description |
---|---|---|
infos | repeated ServiceInfo | none |
RegisterServiceRequest {#registerservicerequest}
RegisterService
Field | Type | Description |
---|---|---|
info | ServiceInfo | none |
RegisterServiceResponse {#registerserviceresponse}
Field | Type | Description |
---|---|---|
expire_time | uint32 | maximum time between ServiceInfo refresh in [sec] |
ServiceInfo {#serviceinfo}
The key of ServiceInfo is the app_instance_id:
Field | Type | Description |
---|---|---|
app_instance_id | string | Mandatory: unique ID of the application Examples: "s7p1", "pnioc1" |
oneof grpc_ip.dns_domainname | string | DNS host name of the driver |
oneof grpc_ip.ipv4_address | string | ipv4 address of the driver |
grpc_ip_port_number | uint32 | Mandatory: port number of gRPC interface |
app_types | repeated string | Mandatory: application type +---------------------------------------------------- |
For more info see the Connectivity Suite documentation. | | interfaces | repeated string | List of all interfaces the app supports. An interface is identified by the package name of the proto file / API service Examples "siemens.connectivitysuite.browsing.v2" or "siemens.connectivitysuite.data.v1" When this list is empty, the service is considered to support all mandatory interfaces of the listed app_types and none of the optional ones. Those are then automatically added by the Registry Service. | | driver_schema_uris | repeated string | Mandatory: the schema identification(s) of the driver |
ServiceInfoFilter {#serviceinfofilter}
QueryRegisteredServices Any property which is not set, is ignored When a property has multiple values, any entry which matches at least one of the fields matches When multiple properties are set, all have to match
Example1: return all apps which have either app_type "cs-driver" or "cs-gateway": .app_types = ["cs-driver", "cs-gateway"]
Example2: return all apps which have app_type "cs-import-converter" and uri="https://siemens.com/connectivity_suite/schemas/s7plus/1.0.0/config.json": .app_types = ["cs-import-converter"] .driver_schema_uris = ["https://siemens.com/connectivity_suite/schemas/s7plus/1.0.0/config.json"]
Field | Type | Description |
---|---|---|
app_instance_ids | repeated string | unique ID(s) of the application Examples: "s7p1", "pnioc1" |
app_types | repeated string | application types Examples "cs-driver" or "cs-gateway" (see 'ServiceInfo.app_types') |
driver_schema_uris | repeated string | the schema identification(s) of the driver |
interfaces | repeated string | interfaces (actually the package names of the interfaces) Examples "siemens.connectivitysuite.browsing.v2" or "siemens.connectivitysuite.data.v1" (see 'ServiceInfo.interfaces') |
UnregisterServiceRequest {#unregisterservicerequest}
UnregisterService Only the following fields of 'info' are considered, the rest is ignored: app_instance_id
Field | Type | Description |
---|---|---|
info | ServiceInfo | none |