Version FC

Dependencies:   DmTftLibrary eeprom SX1280Lib filesystem mbed

Fork of MSNV2-Terminal_V1-5 by Francis CHATAIN

Service.cpp

Committer:
patrick_duc
Date:
2018-08-30
Revision:
19:4b147d8f9164
Parent:
Channel.cpp@ 13:5414193da1de
Child:
20:b0281e8a375a

File content as of revision 19:4b147d8f9164:

#include "Service.hpp"

Service::Service(           DEVICE_TYPE type,
                            MISNET_CODE misnet_code,
                            STATE state,
                            ACCESS_TYPE access_type,
                            REQUEST_MODE request_mode,
                            UP_MODE up_mode,
                            ACCESS_PIN access_pins[6],
                            ACTION action,
                            OUTPUT_MODE output_mode,
                            std::string comment) {
    this->device_type = type;
    this->misnet_code = misnet_code;
    this->state = state;
    this->access_type = access_type;
    this->request_mode = request_mode;
    this->up_mode = up_mode;
    for (int i = 0; i < 6; i++) {
        this->access_pins[i] = access_pins[i];
    }
    this->action = action;
    this->output_mode = output_mode;
    this->comment = comment;
}

std::ostream& operator<<(std::ostream& out, const Service& channel) {
    out << "Device type : " << channel.device_type << ", MISNet code : " << (int) channel.misnet_code;
    out << ", state : " << channel.state << ", comment : " << channel.comment;
    return out;
}