My Project
Loading...
Searching...
No Matches
MCChannelConfig.h
Go to the documentation of this file.
1#pragma once
2
3#include "MCChannel.h"
4#include "enums.h"
5
6// Controller channel config
8{
9 public:
10 MCChannelConfig(MCChannel *channel, int pwrIncStep, int pwrDecStep, bool isInverted, DeviceType deviceType);
11
12 // Returns the channel.
14
15 // Returns a boolean value indicating whether the attached device' polarity is inverted.
16 bool IsInverted();
17
18 // Returns the power step used when increasing power on the channel.
19 int GetPwrIncStep();
20
21 // Returns the power step used when decreasing power on the channel.
22 int GetPwrDecStep();
23
24 // Returns the type of device attached to the channel.
26
27 private:
28 // Type of port.
29 MCChannel *_channel;
30
31 // Power step to use when increasing power on the channel.
32 int _pwrIncStep;
33
34 // Power step to use when decreasing power on the channel.
35 int _pwrDecStep;
36
37 // Boolean value indicating whether the attached device' polarity is inverted.
38 bool _isInverted;
39
40 // Type of device attached to the channel.
41 DeviceType _deviceType = DeviceType::Nothing;
42};
Definition MCChannelConfig.h:8
DeviceType GetAttachedDeviceType()
Definition MCChannelConfig.cpp:28
bool IsInverted()
Definition MCChannelConfig.cpp:13
int GetPwrDecStep()
Definition MCChannelConfig.cpp:23
MCChannel * GetChannel()
Definition MCChannelConfig.cpp:8
int GetPwrIncStep()
Definition MCChannelConfig.cpp:18
MCChannelConfig(MCChannel *channel, int pwrIncStep, int pwrDecStep, bool isInverted, DeviceType deviceType)
Definition MCChannelConfig.cpp:5
Definition MCChannel.h:7
DeviceType
Definition enums.h:20
@ Nothing
Definition enums.h:21