cfgmgr package¶
Submodules¶
EII Message Bus Publisher wrapper object
-
class
cfgmgr.app_config.AppCfg(cfg)¶ Bases:
objectEII Message Bus Publisher object
-
get_dict()¶ Get JSON object from the class object
- Returns
JSON object of AppCfg
- Return type
JSON
-
-
class
cfgmgr.app_config.Watch¶ Bases:
objectEII Message Bus Watch class
-
destroy()¶ Destroy the publisher.
-
watch()¶ - Method to watch over a given key
Calls the base C cfgmgr_watch() API
- Parameters
key – key to watch on
pyFunc – python function
- Type
str
- Type
object
-
watch_config()¶ - Method to watch over an application’s config
Calls the base C cfgmgr_watch() API
- Parameters
pyFunc – python function
- Type
object
-
watch_interface()¶ - Method to watch over an application’s interfaces
Calls the base C cfgmgr_watch() API
- Parameters
pyFunc – python function
- Type
object
-
watch_prefix()¶ - Method to watch over a given prefix
Calls the base C cfgmgr_watch_prefix() API
- Parameters
prefix – prefix to watch on
pyFunc – python function
- Type
str
- Type
object
-
EII Message Bus Publisher wrapper object
-
class
cfgmgr.app_config.AppCfg(cfg)¶ Bases:
objectEII Message Bus Publisher object
-
get_dict()¶ Get JSON object from the class object
- Returns
JSON object of AppCfg
- Return type
JSON
-
-
class
cfgmgr.app_config.Watch¶ Bases:
objectEII Message Bus Watch class
-
destroy()¶ Destroy the publisher.
-
watch()¶ - Method to watch over a given key
Calls the base C cfgmgr_watch() API
- Parameters
key – key to watch on
pyFunc – python function
- Type
str
- Type
object
-
watch_config()¶ - Method to watch over an application’s config
Calls the base C cfgmgr_watch() API
- Parameters
pyFunc – python function
- Type
object
-
watch_interface()¶ - Method to watch over an application’s interfaces
Calls the base C cfgmgr_watch() API
- Parameters
pyFunc – python function
- Type
object
-
watch_prefix()¶ - Method to watch over a given prefix
Calls the base C cfgmgr_watch_prefix() API
- Parameters
prefix – prefix to watch on
pyFunc – python function
- Type
str
- Type
object
-
EII Message Bus Client wrapper object
-
class
cfgmgr.client.Client¶ Bases:
objectEII Message Bus Client object
-
destroy()¶ Destroy the client.
-
get_endpoint()¶ To fetch Endpoint for particular client from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To fetch particular interface value from Client interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Client
- Returns
Messagebus config
- Return type
dict
-
EII Message Bus Client wrapper object
-
class
cfgmgr.client.Client¶ Bases:
objectEII Message Bus Client object
-
destroy()¶ Destroy the client.
-
get_endpoint()¶ To fetch Endpoint for particular client from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To fetch particular interface value from Client interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Client
- Returns
Messagebus config
- Return type
dict
-
EII ConfigManager Python mapping
-
class
cfgmgr.config_manager.ConfigMgr¶ Bases:
objectEII ConfigManager context object
-
get_app_config()¶ gets AppCfg object respective applications config
- Returns
Return object of class AppCfg
- Return type
obj
-
get_app_name()¶ Get the AppName for any application
- Returns
App name
- Return type
str
-
get_client_by_index()¶ To fetch a client interface using it’s index
- Parameters
index – Index of the client
- Type
int
- Returns
Client class object
:rtype : obj
-
get_client_by_name()¶ To fetch a client interface using it’s name
- Parameters
name – Name of the client
- Type
string
- Returns
Client class object
:rtype : obj
-
get_num_clients()¶ Get total number of clients from client’s interface
- Returns
number of clients in interface
:rtype : int
-
get_num_publishers()¶ Get total number of publishers from publisher’s interface
- Returns
number of publishers in interface
:rtype : int
-
get_num_servers()¶ Get total number of servers from server’s interface
- Returns
number of servers in interface
:rtype : int
-
get_num_subscribers()¶ Get total number of subscribers from subscriber’s interface
- Returns
number of subscribers in interface
:rtype : int
-
get_publisher_by_index()¶ To fetch a publisher interface using it’s index
- Parameters
index – Index of the publisher
- Type
int
- Returns
Publisher class object
:rtype : obj
-
get_publisher_by_name()¶ To fetch a publisher interface using it’s name
- Parameters
name – Name of the publisher
- Type
string
- Returns
Publisher class object
:rtype : obj
-
get_server_by_index()¶ To fetch a server interface using it’s index
- Parameters
index – Index of the server
- Type
string
- Returns
Server class object
:rtype : obj
-
get_server_by_name()¶ To fetch a server interface using it’s name
- Parameters
name – Name of the server
- Type
string
- Returns
Server class object
:rtype : obj
-
get_subscriber_by_index()¶ To fetch a subscriber interface using it’s index
- Parameters
index – Index of the subscriber
- Type
int
- Returns
Subscriber class object
:rtype : obj
-
get_subscriber_by_name()¶ To fetch a subscriber interface using it’s name
- Parameters
name – Name of the subscriber
- Type
string
- Returns
Subscriber class object
:rtype : obj
-
get_watch_obj()¶ Fetching the object to call watch APIs
- Returns
Watch class object
:rtype : obj
-
is_dev_mode()¶ To check if application is running in dev or prod mode
- Returns
Whether dev mode is set
- Return type
bool
-
EII ConfigManager Python mapping
-
class
cfgmgr.config_manager.ConfigMgr¶ Bases:
objectEII ConfigManager context object
-
get_app_config()¶ gets AppCfg object respective applications config
- Returns
Return object of class AppCfg
- Return type
obj
-
get_app_name()¶ Get the AppName for any application
- Returns
App name
- Return type
str
-
get_client_by_index()¶ To fetch a client interface using it’s index
- Parameters
index – Index of the client
- Type
int
- Returns
Client class object
:rtype : obj
-
get_client_by_name()¶ To fetch a client interface using it’s name
- Parameters
name – Name of the client
- Type
string
- Returns
Client class object
:rtype : obj
-
get_num_clients()¶ Get total number of clients from client’s interface
- Returns
number of clients in interface
:rtype : int
-
get_num_publishers()¶ Get total number of publishers from publisher’s interface
- Returns
number of publishers in interface
:rtype : int
-
get_num_servers()¶ Get total number of servers from server’s interface
- Returns
number of servers in interface
:rtype : int
-
get_num_subscribers()¶ Get total number of subscribers from subscriber’s interface
- Returns
number of subscribers in interface
:rtype : int
-
get_publisher_by_index()¶ To fetch a publisher interface using it’s index
- Parameters
index – Index of the publisher
- Type
int
- Returns
Publisher class object
:rtype : obj
-
get_publisher_by_name()¶ To fetch a publisher interface using it’s name
- Parameters
name – Name of the publisher
- Type
string
- Returns
Publisher class object
:rtype : obj
-
get_server_by_index()¶ To fetch a server interface using it’s index
- Parameters
index – Index of the server
- Type
string
- Returns
Server class object
:rtype : obj
-
get_server_by_name()¶ To fetch a server interface using it’s name
- Parameters
name – Name of the server
- Type
string
- Returns
Server class object
:rtype : obj
-
get_subscriber_by_index()¶ To fetch a subscriber interface using it’s index
- Parameters
index – Index of the subscriber
- Type
int
- Returns
Subscriber class object
:rtype : obj
-
get_subscriber_by_name()¶ To fetch a subscriber interface using it’s name
- Parameters
name – Name of the subscriber
- Type
string
- Returns
Subscriber class object
:rtype : obj
-
get_watch_obj()¶ Fetching the object to call watch APIs
- Returns
Watch class object
:rtype : obj
-
is_dev_mode()¶ To check if application is running in dev or prod mode
- Returns
Whether dev mode is set
- Return type
bool
-
Custom exceptions used in the Python module
-
exception
cfgmgr.exc.InitializationFailed¶ Bases:
Exception
EII Message Bus Publisher wrapper object
-
class
cfgmgr.publisher.Publisher¶ Bases:
objectEII Message Bus Publisher object
-
destroy()¶ Destroy the publisher.
-
get_allowed_clients()¶ To get the names of the clients allowed to get publishers data
- Returns
List of clients
- Return type
List
-
get_endpoint()¶ To get endpoint for particular publisher from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Publisher interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Publisher
- Returns
Messagebus config
- Return type
dict
-
get_topics()¶ To get topics from publisher interface config on which data will be published :return: List of topics :rtype: List
-
set_topics()¶ To set new topics for publisher in publishers interface config
- Returns
whether topic is set
- Return type
int
-
EII Message Bus Publisher wrapper object
-
class
cfgmgr.publisher.Publisher¶ Bases:
objectEII Message Bus Publisher object
-
destroy()¶ Destroy the publisher.
-
get_allowed_clients()¶ To get the names of the clients allowed to get publishers data
- Returns
List of clients
- Return type
List
-
get_endpoint()¶ To get endpoint for particular publisher from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Publisher interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Publisher
- Returns
Messagebus config
- Return type
dict
-
get_topics()¶ To get topics from publisher interface config on which data will be published :return: List of topics :rtype: List
-
set_topics()¶ To set new topics for publisher in publishers interface config
- Returns
whether topic is set
- Return type
int
-
EII Message Bus Server wrapper object
-
class
cfgmgr.server.Server¶ Bases:
objectEII Message Bus Server object
-
destroy()¶ Destroy the server.
-
get_allowed_clients()¶ To get the names of the clients allowed to connect to server
- Returns
List of clients
- Return type
List
-
get_endpoint()¶ To get endpoint for particular server from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Server interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Server
- Returns
Messagebus config
- Return type
dict
-
EII Message Bus Server wrapper object
-
class
cfgmgr.server.Server¶ Bases:
objectEII Message Bus Server object
-
destroy()¶ Destroy the server.
-
get_allowed_clients()¶ To get the names of the clients allowed to connect to server
- Returns
List of clients
- Return type
List
-
get_endpoint()¶ To get endpoint for particular server from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Server interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Server
- Returns
Messagebus config
- Return type
dict
-
EII Message Bus Subscriber wrapper object
-
class
cfgmgr.subscriber.Subscriber¶ Bases:
objectEII Message Bus Subscriber object
-
destroy()¶ Close the subscriber.
-
get_endpoint()¶ To get endpoint for particular subscriber from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Subscriber interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Subscriber
- Returns
Messagebus config
- Return type
dict
-
get_topics()¶ To gets topics from subscriber interface config on which subscriber receives data
- Returns
List of topics
- Return type
List
-
set_topics()¶ To sets new topics for subscriber in subscribers interface config
- Returns
whether topic is set
- Return type
int
-
EII Message Bus Subscriber wrapper object
-
class
cfgmgr.subscriber.Subscriber¶ Bases:
objectEII Message Bus Subscriber object
-
destroy()¶ Close the subscriber.
-
get_endpoint()¶ To get endpoint for particular subscriber from its interface config
- Returns
Endpoint config
- Return type
string
-
get_interface_value()¶ To get particular interface value from Subscriber interface config
- Parameters
key – Key on which interface value will be extracted
- Type
string
- Returns
Interface value
- Return type
string
-
get_msgbus_config()¶ Constructs message bus config for Subscriber
- Returns
Messagebus config
- Return type
dict
-
get_topics()¶ To gets topics from subscriber interface config on which subscriber receives data
- Returns
List of topics
- Return type
List
-
set_topics()¶ To sets new topics for subscriber in subscribers interface config
- Returns
whether topic is set
- Return type
int
-
EII Message Bus Subscriber wrapper object
-
class
cfgmgr.util.Util¶ Bases:
objectEII Message Bus Publisher object
EII Message Bus Subscriber wrapper object
-
class
cfgmgr.util.Util¶ Bases:
objectEII Message Bus Publisher object
Module contents¶
EII ConfigManager