#pragma once

#include <stdint.h>
#include <string>
#include <vector>
#include "iec61850_client.h"
#include "myMms_m.h"





typedef struct
{
    int quality;
    void *p_val;
    stru_mms_m_time time;
}stru_point_value;

typedef struct 
{
    std::string desc;
    std::string host_ip;
    uint16_t host_port;
    std::string ied;
}stru_para_page;

typedef struct 
{
    uint16_t no;
    uint8_t type;
    uint8_t fc;
    uint8_t ctrl_model;
    std::string name;
    std::string desc;
    std::string ldev;
    std::string lnode;
    std::string doname;
    std::string reference;
    stru_point_value value;
    MmsValue *set_value;
    ControlObjectClient control;
    float min_value;
    float max_value;
    float step_value;
    std::string unit;
    void *p_default;
}stru_point_item;

typedef struct 
{
    std::string desc;
    std::vector<stru_point_item> st;
    std::vector<stru_point_item> mx;
    std::vector<stru_point_item> co;
    std::vector<stru_point_item> ao;
}stru_point_page;


typedef struct 
{
    stru_para_page para;
    stru_point_page point;
}stru_cfg;


stru_cfg *parse_cfg(const std::string &cfg_file);
void parse_show_cfg(stru_cfg* cfg);

