Dear all:
I would like to add the health model to PyACI (`interactive_pyaci.py`),from the SDK 2.0.1 we can know that there is two model in the script:
1. config.py
2. simple_on_off.py
Now,I want to add the health model as the model which has been.
The way I add the new model refer to the config.py ,all the opcode from 'heslth_server.h',and tow
opcode being used for testing:
1. Geting the opcode from heslth_server.h
2.add the health_server.py
3.import the health_server.py into interactive_pyaci.py
there is nothing do with other object
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#05/19/2018
from mesh.access import Model, Opcode
import struct
import json
class HealthServerClient(Model):
#_HEALTH_OPCODE_ATTENTION_GET = Opcode(0x8004)
#_HEALTH_OPCODE_ATTENTION_SET = Opcode(0x8005)
#_HEALTH_OPCODE_ATTENTION_SET_UNACKED = Opcode(0x8006)
#_HEALTH_OPCODE_FAULT_CLEAR = Opcode(0x802f)
#_HEALTH_OPCODE_FAULT_CLEAR_UNACKED = Opcode(0x8030)
#_HEALTH_OPCODE_FAULT_GET = Opcode(0x8031)
#_HEALTH_OPCODE_FAULT_TEST = Opcode(0x8032)
#_HEALTH_OPCODE_FAULT_TEST_UNACKED = Opcode(0x8033)
_HEALTH_OPCODE_PERIOD_GET = Opcode(0x8034)
#_HEALTH_OPCODE_PERIOD_SET = Opcode(0x8035)
#_HEALTH_OPCODE_PERIOD_SET_UNACKED = Opcode(0x8036)
#_HEALTH_OPCODE_CURRENT_STATUS = Opcode(0x04)
then went I run the interactive_pyaci.py the result as below
Did I use the wrong approach? or something missing in the process.