implementation of parts of the unilynx protocol, for communicating with danfos photovoltaic inverters. Still BETA ! needs byte stuff/unstuff fixed, and some CRC are left out for niw...
unilynx.h@2:de090b60d543, 2012-09-04 (annotated)
- Committer:
- morten_opprud
- Date:
- Tue Sep 04 05:48:43 2012 +0000
- Revision:
- 2:de090b60d543
- Parent:
- 1:df4e9da66448
cleaned a bit before comitting, !NOTE! byte stuffing/unstuffing still needs wors, also CRC on incoming data is to be done
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
morten_opprud | 0:66a099b01e08 | 1 | #ifndef UNILYNX_H_ |
morten_opprud | 0:66a099b01e08 | 2 | #define UNILYNX_H_ |
morten_opprud | 0:66a099b01e08 | 3 | |
morten_opprud | 0:66a099b01e08 | 4 | |
morten_opprud | 0:66a099b01e08 | 5 | /* RAW measured values */ |
morten_opprud | 0:66a099b01e08 | 6 | #define RAW_MEAS_VALUES 0X01 |
morten_opprud | 1:df4e9da66448 | 7 | #define ID_RAW_MEAS_VALUES 0X04 |
morten_opprud | 1:df4e9da66448 | 8 | #define INSTANT_ENERGY 0X01 //RETURNS U32 |
morten_opprud | 1:df4e9da66448 | 9 | #define ENERGY_PRODUCTION 0X02 //RETURNS U32 |
morten_opprud | 0:66a099b01e08 | 10 | #define ENERGY_PRODUCTION_TODAY 0X04 //RETURNS U32 |
morten_opprud | 0:66a099b01e08 | 11 | |
morten_opprud | 0:66a099b01e08 | 12 | /* Smoothed measured values */ |
morten_opprud | 1:df4e9da66448 | 13 | #define RAW_SMOOTH_VALUES 0X02 |
morten_opprud | 1:df4e9da66448 | 14 | #define ID_RAW_SMOOTH_VALUES 13//0X0D |
morten_opprud | 1:df4e9da66448 | 15 | #define GRID_VOLTAGE 0X14 //RETURNS U32 |
morten_opprud | 1:df4e9da66448 | 16 | #define GRID_CURRENT_MA 0X15 //RETURNS U32 |
morten_opprud | 1:df4e9da66448 | 17 | #define GRID_FREQ_cHZ 0X16 //RETURNS U32 |
morten_opprud | 0:66a099b01e08 | 18 | |
morten_opprud | 0:66a099b01e08 | 19 | |
morten_opprud | 0:66a099b01e08 | 20 | /* Status values */ |
morten_opprud | 0:66a099b01e08 | 21 | #define STATUS_VALUES 0X0A |
morten_opprud | 0:66a099b01e08 | 22 | #define OPERATION_MODE 0X02 //RETURNS U32 |
morten_opprud | 0:66a099b01e08 | 23 | |
morten_opprud | 0:66a099b01e08 | 24 | |
morten_opprud | 0:66a099b01e08 | 25 | void rs485init(void); |
morten_opprud | 0:66a099b01e08 | 26 | void getNodeInfo(void); |
morten_opprud | 1:df4e9da66448 | 27 | //int readParameter(int param_idx, int param_sub_idx); |
morten_opprud | 1:df4e9da66448 | 28 | int readParameter(int param_idx, int param_sub_idx, int dest); |
morten_opprud | 0:66a099b01e08 | 29 | void test(void); |
morten_opprud | 0:66a099b01e08 | 30 | void ping(void); |
morten_opprud | 0:66a099b01e08 | 31 | |
morten_opprud | 0:66a099b01e08 | 32 | #endif |