ni.measurementlink.sessionmanagement.v1.session_management_service_pb2_grpc

Classes

SessionManagementServiceStub

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

SessionManagementServiceAsyncStub

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

SessionManagementServiceServicer

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

Functions

add_SessionManagementServiceServicer_to_server(...)

Package Contents

class ni.measurementlink.sessionmanagement.v1.session_management_service_pb2_grpc.SessionManagementServiceStub(channel)

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

Parameters:

channel (Union[grpc.Channel, grpc.aio.Channel])

ReserveSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsResponse]

Reserve session(s) for the given I/O resources (pins, relays, channels), sites, and instrument type ID and returns the information needed to create or access the session. Also reserves the session so other processes cannot access it with a ReserveSessions() call.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map

    • Pin or relay name does not match any pin, pin group, relay, or relay group names in the pin map

    • Timeout specified is less than -1.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

UnreserveSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsResponse]

Unreserves sessions so they can be accessed by other clients.

  • RESOURCE_EXHAUSTED:

    • Error occurred while unreserving sessions.

RegisterSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsResponse]

Registers the sessions with this service. Indicates that the sessions are open and will need to be closed later. Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

UnregisterSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsResponse]

Unregisters the sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

ReserveAllRegisteredSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsResponse]

Reserves and gets all sessions currently registered with this service.

  • INVALID_ARGUMENT:

    • Timeout specified is less than -1.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

RegisterMultiplexerSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsResponse]

Registers the multiplexer sessions with this service. Indicates that the sessions are open and will need to be closed later.

Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

UnregisterMultiplexerSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsResponse]

Unregisters the multiplexer sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

GetMultiplexerSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsResponse]

Gets all the connected multiplexer session(s) for the given pin map context and returns information needed to create or access the session.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

GetAllRegisteredMultiplexerSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsResponse]

Gets all multiplexer sessions currently registered with this service.

GetSessions: grpc.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsResponse]

Gets all reserved or registered sessions for the specified instrument and multiplexer types.

class ni.measurementlink.sessionmanagement.v1.session_management_service_pb2_grpc.SessionManagementServiceAsyncStub

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

ReserveSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsResponse]

Reserve session(s) for the given I/O resources (pins, relays, channels), sites, and instrument type ID and returns the information needed to create or access the session. Also reserves the session so other processes cannot access it with a ReserveSessions() call.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map

    • Pin or relay name does not match any pin, pin group, relay, or relay group names in the pin map

    • Timeout specified is less than -1.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

UnreserveSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsResponse]

Unreserves sessions so they can be accessed by other clients.

  • RESOURCE_EXHAUSTED:

    • Error occurred while unreserving sessions.

RegisterSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsResponse]

Registers the sessions with this service. Indicates that the sessions are open and will need to be closed later. Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

UnregisterSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsResponse]

Unregisters the sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

ReserveAllRegisteredSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsResponse]

Reserves and gets all sessions currently registered with this service.

  • INVALID_ARGUMENT:

    • Timeout specified is less than -1.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

RegisterMultiplexerSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsResponse]

Registers the multiplexer sessions with this service. Indicates that the sessions are open and will need to be closed later.

Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

UnregisterMultiplexerSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsResponse]

Unregisters the multiplexer sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

GetMultiplexerSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsResponse]

Gets all the connected multiplexer session(s) for the given pin map context and returns information needed to create or access the session.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

GetAllRegisteredMultiplexerSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsResponse]

Gets all multiplexer sessions currently registered with this service.

GetSessions: grpc.aio.UnaryUnaryMultiCallable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsRequest, ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsResponse]

Gets all reserved or registered sessions for the specified instrument and multiplexer types.

class ni.measurementlink.sessionmanagement.v1.session_management_service_pb2_grpc.SessionManagementServiceServicer

Service to keep track of open sessions used by measurement services, and to allow measurement services to access sessions by I/O resource and site.

abstractmethod ReserveSessions(request, context)

Reserve session(s) for the given I/O resources (pins, relays, channels), sites, and instrument type ID and returns the information needed to create or access the session. Also reserves the session so other processes cannot access it with a ReserveSessions() call.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map

    • Pin or relay name does not match any pin, pin group, relay, or relay group names in the pin map

    • Timeout specified is less than -1.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveSessionsResponse]]

abstractmethod UnreserveSessions(request, context)

Unreserves sessions so they can be accessed by other clients.

  • RESOURCE_EXHAUSTED:

    • Error occurred while unreserving sessions.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnreserveSessionsResponse]]

abstractmethod RegisterSessions(request, context)

Registers the sessions with this service. Indicates that the sessions are open and will need to be closed later. Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterSessionsResponse]]

abstractmethod UnregisterSessions(request, context)

Unregisters the sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterSessionsResponse]]

abstractmethod ReserveAllRegisteredSessions(request, context)

Reserves and gets all sessions currently registered with this service.

  • INVALID_ARGUMENT:

    • Timeout specified is less than -1.

  • UNAVAILABLE:

    • Session(s) were already reserved and didn’t become available before the specified timeout expired.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.ReserveAllRegisteredSessionsResponse]]

abstractmethod RegisterMultiplexerSessions(request, context)

Registers the multiplexer sessions with this service. Indicates that the sessions are open and will need to be closed later.

Status codes for errors:

  • ALREADY_EXISTS:

    • Session by the same name is already registered.

  • INVALID_ARGUMENT:

    • Session names list has an empty string.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.RegisterMultiplexerSessionsResponse]]

abstractmethod UnregisterMultiplexerSessions(request, context)

Unregisters the multiplexer sessions with this service. Indicates that the sessions have been closed and will need to be reopened before they can be used again.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.UnregisterMultiplexerSessionsResponse]]

abstractmethod GetMultiplexerSessions(request, context)

Gets all the connected multiplexer session(s) for the given pin map context and returns information needed to create or access the session.

Status codes for errors:

  • INVALID_ARGUMENT:

    • Pin Map Context references a site number that is not defined in the pin map.

  • NOT_FOUND:

    • Pin Map Context has a pin map ID that does not match any pin maps registered with the Pin Map Service.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetMultiplexerSessionsResponse]]

abstractmethod GetAllRegisteredMultiplexerSessions(request, context)

Gets all multiplexer sessions currently registered with this service.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetAllRegisteredMultiplexerSessionsResponse]]

abstractmethod GetSessions(request, context)

Gets all reserved or registered sessions for the specified instrument and multiplexer types.

Parameters:
Return type:

Union[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsResponse, collections.abc.Awaitable[ni.measurementlink.sessionmanagement.v1.session_management_service_pb2.GetSessionsResponse]]

ni.measurementlink.sessionmanagement.v1.session_management_service_pb2_grpc.add_SessionManagementServiceServicer_to_server(servicer, server)
Parameters:
Return type:

None