C# Class Contrequarte.SmartPlug.Core.TimePeriod

Afficher le fichier Open project: contrequarte/SmartPlugSP2101W Class Usage Examples

Méthodes publiques

Méthode Description
EdimaxScheduleList2ScheduledEntries ( string edimaxScheduleList ) : IEnumerable

Converting the value of an Edimax node to a List. the node value looks like following e.g.: 00011-0c0m1-m0mu1-n0nP1

IsIntersectionFree ( IEnumerable timePeriods ) : bool

Checking, if an enumeration of TimePeriod objects doesn't contain intersecting TimePeriods

TimePeriod ( PointInTime begin, PointInTime end ) : System

Private Methods

Méthode Description
CharToNumber ( char charToConvert ) : int

Converting the characters used in to the corresponding number to get the times coded mor human readable

EdimaxScheduledEntryPart2ScheduledEntry ( string scheduledListPart ) : ScheduledEntry

Converting a single schedule entry of the smartplug to a ScheduledEntry object such a single schedule entry consists of 5 characters [hour][minute][hour][minute][on/Off] [hour] is one single char representing the numbers from 0 to 23/24 [minute] is one single char representing the numbers from 0 to 59 [on/off] char '1' stands for 'on' char '0' represents 'off'

Method Details

EdimaxScheduleList2ScheduledEntries() public static méthode

Converting the value of an Edimax node to a List. the node value looks like following e.g.: 00011-0c0m1-m0mu1-n0nP1
public static EdimaxScheduleList2ScheduledEntries ( string edimaxScheduleList ) : IEnumerable
edimaxScheduleList string string representing the schedule list from an Edimax SmartPlug
Résultat IEnumerable

IsIntersectionFree() public static méthode

Checking, if an enumeration of TimePeriod objects doesn't contain intersecting TimePeriods
public static IsIntersectionFree ( IEnumerable timePeriods ) : bool
timePeriods IEnumerable enumeration of Timeperiod objects to check
Résultat bool

TimePeriod() public méthode

public TimePeriod ( PointInTime begin, PointInTime end ) : System
begin PointInTime
end PointInTime
Résultat System