Click here to return to the main index to Sherlock's APIs.
This section contains health checks and exit APIs shared by all services. Clicking on the active links in the table below will take you to the selected API.
Table 12.41: Index to Sherlock Common Service APIs
Method Name | Request Type | Response Type | Description |
For display purposes, the long strings in columns one through three are broken into multiple lines. Example: .IsSherlockClientLoadingRequest | |||
check | .HealthCheck Request | .HealthCheck Response | Returns health status of gRPC server. |
exit | .ExitRequest | .ReturnCode | Signals for gRPC connection to shutdown. |
isSherlock ClientLoading | .IsSherlockClient LoadingRequest | ReturnCode | Check if SherlockClient is still loading. |
listUnits | .ListUnitsRequest | .ListUnits Response | Returns a list of valid units of the provided unit type. |
getSolders | .GetSoldersRequest | .GetSoldersResponse | Returns a list of valid solder materials. |
Empty request to exit the gRPC connection.
Table 12.42: ExitRequest
Field | Type | Label | Description |
closeSherlockClient | bool | If set to true, exits the Sherlock client if it is opened. Otherwise, just closes the gRPC connection. |
Proto Request Example
{ "closeSherlockClient": true } Python Example: import SherlockCommonService_pb2 import SherlockCommonService_pb2_grpc import grpc channel = grpc.insecure_channel('localhost:9090') stub = SherlockCommonService_pb2_grpc.SherlockCommonServiceStub(channel) message = SherlockCommonService_pb2.ExitRequest() message.closeSherlockClient = True response = stub.exit(message) print(str(response))
Python Example:
For a Python example, refer to the online PySherlock Reference.
Request for a list of valid units of the provided unit type.
Table 12.43: ListUnitsRequest
Field | Type | Label | Description |
unitType | ListUnitsRequest.UnitType | Unit type to request valid units of. |
Table 12.44: ListUnitsRequest.UnitType
Name | Number | Description |
UNKNOWN | 0 | Indicates an unknown unit type. |
ACCEL_DENSITY | 1 | Units used for acceleration density. |
ACCELERATION | 2 | Units used for acceleration. |
AREA | 3 | Units used for area. |
BANDWIDTH | 4 | Units used for bandwidth. |
CAPACITANCE | 5 | Units used for electrical capacitance. |
CTE | 6 | Units used for material CTE. |
CURRENT | 7 | Units used for electrical current. |
DENSITY | 8 | Units used for density. |
DISP_DENSITY | 9 | Units used for displacement density. |
FORCE | 10 | Units used for force. |
FREQUENCY | 11 | Units used for frequency. |
INDUCTANCE | 12 | Units used for inductance. |
LENGTH | 13 | Units used for length. |
POWER | 14 | Units used for electrical power. |
RESISTANCE | 15 | Units used for electrical resistance. |
SIZE | 16 | Units used for size. |
SPECIFIC_HEAT | 17 | Units used for specific heat. |
STRAIN | 18 | Units used for strain. |
STRESS | 19 | Units used for stress. |
TEMPERATURE | 20 | Units used for temperature. |
THERMAL_CONDUCTIVITY | 21 | Units used for thermal conductivity. |
THERMAL_RESISTANCE | 22 | Units used for thermal resistance. |
TIME | 23 | Units used for time. |
VELOCITY | 24 | Units used for velocity. |
VELOCITY_DENSITY | 25 | Units used for velocity density. |
VOLTAGE | 26 | Units used for electrical voltage. |
VOLUME | 27 | Units used for volume. |
WEIGHT | 28 | Units used for weight. |
Represents a list of valid units for the provided unit type.
Table 12.45: ListUnitsResponse
Field | Type | Label | Description |
returnCode | ReturnCode | Status code of response. | |
units | string | repeated | List of valid units for the requested type. |
Represents a list of valid solder materials
Table 12.47: GetSoldersResponse
Field | Type | Label | Description |
solderName | string | repeated | List of valid solder materials. |
Proto Request Example
{}
Python Example:
For a Python example, refer to the online PySherlock Reference.
Links:
Represents whether the gRPC connection is open.
Table 12.48: HealthCheckResponse
Field | Type | Label | Description |
status | HealthCheckResponse.ServingStatus | ||
port | int32 | Listening port number on server. |
Table 12.49: HealthCheckResponse.ServingStatus
Name | Number | Description |
UNKNOWN | 0 | Indicates an unknown connection status. |
SERVING | 1 | Indicates the connection is up and server is listening. |
NOT_SERVING | 2 | Indicates connection with server is closed. |
Proto Request Example
{ }
Python Example
import SherlockCommonService_pb2 import SherlockCommonService_pb2_grpc import grpc channel = grpc.insecure_channel('localhost:9090') stub = SherlockCommonService_pb2_grpc.SherlockCommonServiceStub(channel) response = stub.check(SherlockCommonService_pb2.HealthCheckRequest()) print(str(response))
Proto Request Example:
{ "unitType": 13 }
Python Example:
For a Python example, refer to the online PySherlock Reference.