My Project
Loading...
Searching...
No Matches
MCChannel.h
Go to the documentation of this file.
1#pragma once
2
3#include "enums.h"
4
5// Controller channel
7{
8 public:
9 MCChannel(ChannelType portType, std::string address);
10
11 // Returns the type of channel the device is attached to.
13
14 // Returns the raw channel address.
15 std::string GetAddress();
16
17 // Returns the channel's address interpreted as an ESP pin number.
19
20 // Gets the parent hub/receiver address.
21 std::string GetParentAddress();
22
23 // Sets the parent hub/receiver address.
24 void SetParentAddress(const std::string address);
25
26 private:
27 // Type of channel.
28 ChannelType _portType;
29
30 // Can be hub/receiver channel or ESP pin number.
31 std::string _address;
32
33 // Can be hub/receiver address.
34 std::string _parentAddress;
35};
Definition MCChannel.h:7
int GetAddressAsEspPinNumber()
Definition MCChannel.cpp:17
void SetParentAddress(const std::string address)
Definition MCChannel.cpp:31
std::string GetParentAddress()
Definition MCChannel.cpp:26
ChannelType GetChannelType()
Definition MCChannel.cpp:7
std::string GetAddress()
Definition MCChannel.cpp:12
MCChannel(ChannelType portType, std::string address)
Definition MCChannel.cpp:4
ChannelType
Definition enums.h:5