Skip to content

Commit

Permalink
Sync Pin Map and Session Management Service Proto: Multiplexer Data C…
Browse files Browse the repository at this point in the history
…hanges (#26)

* Updated pin map proto to be in sync with mux

* updated session management service proto

* Update channel mapping documentation

* improve grammer in documentation
  • Loading branch information
Avinash2Suresh authored Jan 24, 2024
1 parent f92c79e commit 72a4a32
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
13 changes: 11 additions & 2 deletions ni/measurementlink/pinmap/v1/pin_map_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ message ResourceAccessInformation {
// For custom instruments the user defined instrument type id is defined in the pin map file.
string instrument_type_id = 3;

// List of site and pin/relay mappings that correspond to each channel in the channel_list.
// Each item contains a mapping corresponding to a channel in this instrument resource, in the order of the channel_list.
// List of site and pin/relay mappings with the multiplexer info for each channel in the channel_list.
// Each item represents a channel-to-pin connection for this instrument resource. In the case of shared pins, there is a separate item for each connection.
repeated ChannelMapping channel_mappings = 4;
}

Expand All @@ -223,4 +223,13 @@ message ChannelMapping {

// The channel to which the pin or relay is mapped on this site.
string channel = 3;

// The multiplexer resource name is used to open the multiplexer session in the driver.
string multiplexer_resource_name = 4;

// The multiplexer route through which the pin is connected to an instrument's channel.
string multiplexer_route = 5;

// User-defined identifier for the multiplexer type in the pin map editor.
string multiplexer_type_id = 6;
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ message SessionInformation{
// This field is readonly.
bool session_exists = 5;

// List of site and pin/relay mappings that correspond to each channel in the channel_list.
// Each item contains a mapping corresponding to a channel in this instrument resource, in the order of the channel_list.
// List of site and pin/relay mappings with the multiplexer info for each channel in the channel_list.
// Each item represents a channel-to-pin connection for this instrument resource. In the case of shared pins, there is a separate item for each connection.
// This field is empty for any SessionInformation returned from ReserveAllRegisteredSessions.
// This field is readonly.
repeated ChannelMapping channel_mappings = 6;
Expand All @@ -101,6 +101,30 @@ message ChannelMapping {

// The channel to which the pin or relay is mapped on this site.
string channel = 3;

// The multiplexer resource name is used to open the multiplexer session in the driver.
string multiplexer_resource_name = 4;

// The multiplexer route through which the pin is connected to an instrument's channel.
string multiplexer_route = 5;
}

message MultiplexerSessionInformation {
// Session identifier used to identify the session in the session management service, as well as in driver services such as grpc-device.
// This field is readonly.
nidevice_grpc.Session session = 1;

// Resource name is used to open this session in the driver.
// This field is readonly.
string resource_name = 2;

// User-defined identifier for the multiplexer type in the pin map editor.
// This field is readonly.
string multiplexer_type_id = 3;

// Indicates whether the session exists in the Session Manager. This indicates whether the session has been created.
// This field is readonly.
bool session_exists = 4;
}

message ReserveSessionsRequest {
Expand Down Expand Up @@ -131,6 +155,10 @@ message ReserveSessionsResponse{
// List of information needed to create or use each session for the given pin, site, and instrument type ID.
// This field is readonly.
repeated SessionInformation sessions = 1;

// List of information needed to create or use each multiplexer session for the given pin, site, and instrument type ID.
// This field is readonly.
repeated MultiplexerSessionInformation multiplexer_sessions = 2;
}

message UnreserveSessionsRequest {
Expand Down Expand Up @@ -178,4 +206,4 @@ message ReserveAllRegisteredSessionsRequest {
message ReserveAllRegisteredSessionsResponse{
// Sessions currently registered in the session management service.
repeated SessionInformation sessions = 1;
}
}

0 comments on commit 72a4a32

Please sign in to comment.