CVBpy 15.0
NodeMap Class Reference

Contains all nodes of a device or module. More...

Inherits object.

Public Member Functions

None download_file (self, str file_name, str file_selector_entry_name)
 Downloads a file from the camera via the GenApi file download. More...
 
None load_settings (self, str file_name)
 Loads the node values from the gcs file and sets the node values accordingly. More...
 
cvb.Node node (self, str name)
 Gets a node that is specified by the given name. More...
 
None poll_nodes (self)
 Polls all nodes of this node map that have a polling time.
 
None save_settings (self, str file_name, Optional[Union[List[cvb.Node], List[str]]] node_list)
 Saves all nodes or all nodes that are in a specific list. More...
 
str to_json (self, Optional[List[cvb.Node]] nodes, Optional[Callable[[cvb.Node, str], None]] serialization_error_callback)
 Serializes the given nodes to json. More...
 
cvb.Node try_get_node (self, str name)
 Tries to get a node that is specified by the given name. More...
 
None upload_file (self, str file_name, str file_selector_entry_name)
 Uploads a file to the camera via the GenApi file upload. More...
 

Properties

 available_files = property
 List[str]: Gets the currently available file identifiers, which can be downloaded or uploaded.
 
 description = property
 str: Gets the descriptive text of this node map.
 
 model_name = property
 str: Gets the name of the model, that the XML description is for. More...
 
 name = property
 str: Name used to access this node map.
 
 nodes = property
 Dict[str, cvb.Node]: Get a dictionary that contains all nodes of this node map.
 
 tool_tip = property
 str: Gets the short descriptive text, if any is available.
 
 transport_layer_namespace = property
 str: Gets the transport layer type of the device.
 
 vendor_name = property
 str: Gets the name of the vendor, who created the XML description. More...
 
 xml_file_schema_version = property
 cvb.GenApiVersion: Gets the XML schema version.
 
 xml_file_version = property
 cvb.GenApiVersion: Gets the XML version.
 

Detailed Description

Contains all nodes of a device or module.

Member Function Documentation

◆ download_file()

None download_file (   self,
str  file_name,
str  file_selector_entry_name 
)

Downloads a file from the camera via the GenApi file download.

Parameters

file_name : str Complete path to the file in which the data is to be stored.

file_selector_entry_name : str Symbolic name of the EnumerationNode identifying the file to download.

◆ load_settings()

None load_settings (   self,
str  file_name 
)

Loads the node values from the gcs file and sets the node values accordingly.

Parameters

file_name : str The gcs file name.

◆ node()

cvb.Node node (   self,
str  name 
)

Gets a node that is specified by the given name.

Parameters

name : str Name of the node.

Returns

cvb.Node Node that is specified by the given name.

◆ save_settings()

None save_settings (   self,
str  file_name,
Optional[Union[List[cvb.Node], List[str]]]  node_list 
)

Saves all nodes or all nodes that are in a specific list.

Parameters

file_name : str The gcs file name.

node_list : Optional[Union[List[cvb.Node], List[str]]] A list with either nodes to save or their names.

◆ to_json()

str to_json (   self,
Optional[List[cvb.Node]]  nodes,
Optional[Callable[[cvb.Node, str], None]]  serialization_error_callback 
)

Serializes the given nodes to json.

Parameters

nodes : Optional[List[cvb.Node]] The nodes to serialize. If not provided, all nodes of this nodemap will be serialized.

serialization_error_callback : Optional[Callable[[cvb.Node, str], None]] Callback to call when a node cannot be serialized. If not provided or none, an exception will be thrown when a node cannot be serialized.

Returns

str The json string.

◆ try_get_node()

cvb.Node try_get_node (   self,
str  name 
)

Tries to get a node that is specified by the given name.

Parameters

name : str Name of the node to try to get.

Returns

cvb.Node Node that is specified by the given name. None if node was not found.

◆ upload_file()

None upload_file (   self,
str  file_name,
str  file_selector_entry_name 
)

Uploads a file to the camera via the GenApi file upload.

Parameters

file_name : str Complete path to the file to store data to.

file_selector_entry_name : str Symbolic name of the EnumerationNode identifying the file to upload.

Property Documentation

◆ model_name

model_name = property
static

str: Gets the name of the model, that the XML description is for.

Often this name does not match the information of the GenTL port (discovery information).

◆ vendor_name

vendor_name = property
static

str: Gets the name of the vendor, who created the XML description.

Often this name does not match the information of the GenTL port (discovery information).