* GEN3: Invalid Contact Info Msg Fixes #191 * introduce ifc with FIFOs * add object factory * use AsyncIfc class with FIFO * declare more methods as classmethods * - refactoring - remove _forward_buffer - make async_write private * remove _forward_buffer * refactoring * avoid mqtt handling for invalid serial numbers * add two more callbacks * FIX update_header_cb handling * split AsyncStream in two classes * split ConnectionG3(P) in server and client class * update class diagramm * refactor server creation * remove duplicated imports * reduce code duplication * move StremPtr instances into Inverter class * resolution of connection classes - remove ConnectionG3Client - remove ConnectionG3Server - remove ConnectionG3PClient - remove ConnectionG3PServer * fix server connections * fix client loop closing * don't overwrite self.remote in constructor * update class diagramm * fixes - fixes null pointer accesses - initalize AsyncStreamClient with proper StreamPtr instance * add close callback * refactor close handling * remove connection classes * move more code into InverterBase class * remove test_inverter_base.py * add abstract inverter interface class * initial commit * fix sonar qube warnings * rename class Inverter into Proxy * fix typo * move class InverterIfc into a separate file * add more testcases * use ProtocolIfc class * add unit tests for AsyncStream class * icrease test coverage * reduce cognitive complexity * increase test coverage * increase tes coverage * simplify heartbeat handler * remove obsolete tx_get method * add more unittests * update changelog * remove __del__ method for proper gc runs * check releasing of ModbusConn instances * call garbage collector to release unreachable objs * decrease ref counter after the with block
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
// {type:class}
|
|
// {direction:topDown}
|
|
// {generate:true}
|
|
|
|
[note: You can stick notes on diagrams too!{bg:cornsilk}]
|
|
[<<AbstractIterMeta>>||__iter__()]
|
|
|
|
[Mqtt;<<Singleton>>|<static>ha_restarts;<static>__client;<static>__cb_MqttIsUp|<async>publish();<async>close()]
|
|
[Proxy|<cls>db_stat;<cls>entity_prfx;<cls>discovery_prfx;<cls>proxy_node_id;<cls>proxy_unique_id;<cls>mqtt:Mqtt;;__ha_restarts|class_init();class_close();;<async>_cb_mqtt_is_up();<async>_register_proxy_stat_home_assistant();<async>_async_publ_mqtt_proxy_stat(key)]
|
|
|
|
[<<InverterIfc>>||healthy()->bool;<async>disc(shutdown_started=False);<async>create_remote();]
|
|
[<<AbstractIterMeta>>]^-.-[<<InverterIfc>>]
|
|
[InverterBase|_registry;__ha_restarts;;addr;config_id:str;prot_class:MessageProt;remote:StreamPtr;local:StreamPtr;|healthy()->bool;<async>disc(shutdown_started=False);<async>create_remote();<async>async_publ_mqtt()]
|
|
[StreamPtr||stream:ProtocolIfc;ifc:AsyncIfc]
|
|
[<<InverterIfc>>]^-.-[InverterBase]
|
|
[InverterG3]-[note: Creates an GEN3 inverter instance with prot_class:Talent{bg:cornsilk}]
|
|
[InverterG3P]-[note: Creates an GEN3PLUS inverter instance with prot_class:SolarmanV5{bg:cornsilk}]
|
|
[InverterBase]^[InverterG3]
|
|
[InverterBase]^[InverterG3P]
|
|
[Proxy]^[InverterBase]
|
|
[InverterBase]-2>[StreamPtr]
|
|
[Proxy]++->[Mqtt;<<Singleton>>]
|
|
|
|
[<<AsyncIfc>>]
|
|
|
|
|
|
[StreamPtr]-1>[<<ProtocolIfc>>]
|
|
[StreamPtr]-1>[<<AsyncIfc>>]
|
|
|
|
|
|
[<<ProtocolIfc>>]use-.->[<<AsyncIfc>>]
|
|
|
|
|
|
[ModbusConn|host;port;addr;stream:InverterG3P;|]has-1>[InverterG3P]
|
|
[ModbusTcp]creates-*>[ModbusConn]
|
|
|