obci.control.common package

Submodules

obci.control.common.cfg_messages_pb2 module

obci.control.common.config_helpers module

exception obci.control.common.config_helpers.OBCISystemError[source]

Bases: Exception

obci.control.common.config_helpers.argument_not_empty_check(p_arg)[source]
obci.control.common.config_helpers.module_id_type_check(p_module_id)[source]
obci.control.common.config_helpers.param_name_type_check(p_param_name)[source]
obci.control.common.config_helpers.reference_split(p_reference)[source]
obci.control.common.config_helpers.reference_type_check(p_reference)[source]

obci.control.common.config_message module

exception obci.control.common.config_message.ConfigMessageError[source]

Bases: Exception

obci.control.common.config_message.dict2params(dic, config_params_msg, field_name='params')[source]

Take parameters from the dictionary dic, encode values to json and put them in the config_params_msg. The message should have a ‘params’ attribute

obci.control.common.config_message.fill_and_pack(mx_type, **kwargs)[source]
obci.control.common.config_message.fill_msg(mx_type, **kwargs)[source]

This does NOT encode any values to json!

obci.control.common.config_message.launcher_cmd(sender_id, encoded_launcher_msg)[source]
obci.control.common.config_message.msg_for_type(mx_type)[source]
obci.control.common.config_message.msg_to_dict(msg, val_f=None)[source]

Does not convert nested messages!

obci.control.common.config_message.pack_msg(msg)[source]
obci.control.common.config_message.params2dict(config_params_msg, field_name='params')[source]

Take parameters from the config_params_msg, put them in a dictionary (with decoded values from json) and return it. The message should have a ‘params’ attribute

obci.control.common.config_message.str2val(string)[source]
obci.control.common.config_message.unpack_msg(mx_type, msg_str)[source]
obci.control.common.config_message.val2str(value)[source]

obci.control.common.graph module

class obci.control.common.graph.Graph(bidirectional=False)[source]

Bases: object

add_edge(v_a, v_z)[source]
add_vertex(vertex)[source]
copy()[source]
is_bidirectional()[source]
remove_edge(edge)[source]
remove_vertex(vertex)[source]
topo_sort()[source]
vertices()[source]
class obci.control.common.graph.Vertex(graph, model, id_method=None)[source]

Bases: object

copy(new_graph)[source]
in_edges()[source]
neighbours()[source]
out_edges()[source]

obci.control.common.message module

class obci.control.common.message.LauncherMessage[source]

Bases: object

ParseFromString(bytes)[source]
SerializeToString()[source]
dict()[source]
keys()[source]
raw()[source]
exception obci.control.common.message.OBCIMessageError[source]

Bases: Exception

class obci.control.common.message.OBCIMessageTool(msg_templates, errors=[])[source]

Bases: object

add_templates(msg_templates)[source]
decode_msg(msg)[source]
fill_msg(msg_type, **kwargs)[source]
unpack_msg(msg)[source]
class obci.control.common.message.PollingObject[source]

Bases: object

poll_recv(socket, timeout)[source]
obci.control.common.message.recv_msg(sock, flags=0)[source]
obci.control.common.message.send_msg(sock, message, flags=0)[source]

obci.control.common.net_tools module

class obci.control.common.net_tools.DNS(allowed_silence_time=45, logger=None)[source]

Bases: object

clean_silent()[source]
copy()[source]
dict_snapshot()[source]
hostname(ip=None, uuid=None)[source]
http_addr(hostname=None, ip=None, uuid=None)[source]
ip(hostname=None, uuid=None)[source]
is_this_machine(address)[source]
mass_update(server_dict)[source]
snapshot()[source]
tcp_rep_addr(hostname=None, ip=None, uuid=None)[source]
this_addr_local()[source]
this_addr_network()[source]
update(ip, hostname, uuid, rep_port, pub_port, http_port=None)[source]
class obci.control.common.net_tools.PeerNetworkDescriptor(ip, hostname, uuid, rep_port, pub_port, http_port=None, timestamp=None)[source]

Bases: object

as_dict()[source]
obci.control.common.net_tools.addr_is_local(addr)[source]
obci.control.common.net_tools.choose_addr(addr_list)[source]
obci.control.common.net_tools.choose_local(addrs, ip=False)[source]
obci.control.common.net_tools.choose_not_local(addrs)[source]
obci.control.common.net_tools.ext_ip(peer_ip=None)[source]
obci.control.common.net_tools.is_ip(addr_string)[source]
obci.control.common.net_tools.is_net_addr(addr)[source]
obci.control.common.net_tools.lo_ip()[source]
obci.control.common.net_tools.peer_loglevel()[source]
obci.control.common.net_tools.port(addr_string)[source]
obci.control.common.net_tools.server_address(sock_type='rep', local=False, peer_ip=None)[source]
obci.control.common.net_tools.server_bcast_port()[source]
obci.control.common.net_tools.server_pub_port()[source]
obci.control.common.net_tools.server_rep_port()[source]
obci.control.common.net_tools.server_tcp_proxy_port()[source]

obci.control.common.obci_control_settings module

Module contents