Skip to content

Commit

Permalink
add support for transport layer and stream params
Browse files Browse the repository at this point in the history
  • Loading branch information
berndpfrommer committed Jul 8, 2024
1 parent fb35a79 commit e1e5a3d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6 deletions.
13 changes: 13 additions & 0 deletions spinnaker_camera_driver/config/blackfly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,16 @@ parameters:
- name: chunk_enable_timestamp
type: bool
node: ChunkDataControl/ChunkEnable
#
# ------- stream layer
#
- name: "stream_buffer_handling_mode"
type: enum
# valid values: "NewestFirst", "OldestFirst", "NewestOnly", "OldestFirstOverwrite"
node: BufferHandlingControl/StreamBufferHandlingMode
#
# ------- transport layer
#
- name: "multicast_monitor_mode"
type: bool
node: "DeviceControl/DeviceMulticastMonitorMode"
7 changes: 7 additions & 0 deletions spinnaker_camera_driver/config/blackfly_s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,10 @@ parameters:
- name: chunk_enable_timestamp
type: bool
node: ChunkDataControl/ChunkEnable
#
# ------- stream layer
#
- name: "stream_buffer_handling_mode"
type: enum
# valid values: "NewestFirst", "OldestFirst", "NewestOnly", "OldestFirstOverwrite"
node: BufferHandlingControl/StreamBufferHandlingMode
7 changes: 4 additions & 3 deletions spinnaker_camera_driver/launch/driver_node.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
'chunk_enable_timestamp': True,
},
'blackfly': {
'debug': True,
'dump_node_map': True,
'debug': False,
'dump_node_map': False,
'gain_auto': 'Continuous',
'pixel_format': 'BayerRG8',
'exposure_auto': 'Continuous',
Expand All @@ -73,7 +73,8 @@
'frame_rate_enable': True,
'buffer_queue_size': 10,
'trigger_mode': 'Off',
'stream_buffer_handling_mode': 'NewestFirst'
# 'stream_buffer_handling_mode': 'NewestFirst',
# 'multicast_monitor_mode': False
},
'chameleon': {
'debug': False,
Expand Down
16 changes: 13 additions & 3 deletions spinnaker_camera_driver/src/genicam_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,19 @@ static std::optional<CNodePtr> find_node(
std::optional<CNodePtr> find_node(
const std::string & path, Spinnaker::CameraPtr cam, bool debug, bool allow_unreadable)
{
INodeMap & appLayerNodeMap = cam->GetNodeMap();
CNodePtr rootNode = appLayerNodeMap.GetNode("Root");
return (find_node(path, rootNode, debug, allow_unreadable));
CNodePtr rootNode = cam->GetNodeMap().GetNode("Root");
std::optional<CNodePtr> nodeptr = find_node(path, rootNode, debug, allow_unreadable);
if (nodeptr) {
return (nodeptr);
}
rootNode = cam->GetTLStreamNodeMap().GetNode("Root");
nodeptr = find_node(path, rootNode, debug, allow_unreadable);
if (nodeptr) {
return (nodeptr);
}
rootNode = cam->GetTLDeviceNodeMap().GetNode("Root");
nodeptr = find_node(path, rootNode, debug, allow_unreadable);
return (nodeptr);
}
} // namespace genicam_utils
} // namespace spinnaker_camera_driver

0 comments on commit e1e5a3d

Please sign in to comment.