DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
FunctionsState Class Reference

#include "DCCpp.hpp"

Public Member Functions

 FunctionsState ()
 
void clear ()
 
void activate (byte inFunctionNumber)
 
void inactivate (byte inFunctionNumber)
 
bool isActivated (byte inFunctionNumber)
 

Detailed Description

This is a class to handle decoder functions. An instance of this class handle the status of the functions of one decoder. A function can be active or not.

Definition at line 13 of file DCCpp.hpp.

Constructor & Destructor Documentation

FunctionsState ( )

Initialize the instance.

Definition at line 24 of file DCCpp.cpp.

Member Function Documentation

void clear ( )

Reset all functions to inactive.

Definition at line 29 of file DCCpp.cpp.

void activate ( byte  inFunctionNumber)

Activate one function. The allowed number goes from 0 to 28, maximum for DCC.

Parameters
inFunctionNumberNumber of the function to activate.

Definition at line 38 of file DCCpp.cpp.

void inactivate ( byte  inFunctionNumber)

Inactivate one function. The allowed number goes from 0 to 28, maximum for DCC.

Parameters
inFunctionNumberNumber of the function to inactivate.

Definition at line 43 of file DCCpp.cpp.

bool isActivated ( byte  inFunctionNumber)

Check if the given function is activated. The allowed number goes from 0 to 28, maximum for DCC.

Parameters
inFunctionNumberNumber of the function to activate.
Returns
True if the given function is activated.

Definition at line 48 of file DCCpp.cpp.