1+ """card Fluent API Helper.
2+
3+ This module contains helper methods for calling card.*
4+ Notecard API commands.
5+ """
16import notecard
27
38
49def attn (card , mode = None , files = None , seconds = None ):
10+ """Configure interrupt detection between a host and Notecard.
11+
12+ Args:
13+ mode (string): The attn mode to set.
14+ files (array): A collection of notefiles to watch.
15+ seconds (int): A timeout to use when arming attn mode.
16+
17+ Returns:
18+ string: The result of the Notecard request.
19+ """
520 if not isinstance (card , notecard .Notecard ):
621 raise Exception ("Notecard object required" )
722
@@ -16,6 +31,11 @@ def attn(card, mode=None, files=None, seconds=None):
1631
1732
1833def time (card ):
34+ """Retrieve the current time and date from the Notecard.
35+
36+ Returns:
37+ string: The result of the Notecard request.
38+ """
1939 if not isinstance (card , notecard .Notecard ):
2040 raise Exception ("Notecard object required" )
2141
@@ -24,6 +44,11 @@ def time(card):
2444
2545
2646def status (card ):
47+ """Retrieve the status of the Notecard.
48+
49+ Returns:
50+ string: The result of the Notecard request.
51+ """
2752 if not isinstance (card , notecard .Notecard ):
2853 raise Exception ("Notecard object required" )
2954
@@ -32,6 +57,11 @@ def status(card):
3257
3358
3459def temp (card ):
60+ """Retrieve the current temperature from the Notecard.
61+
62+ Returns:
63+ string: The result of the Notecard request.
64+ """
3565 if not isinstance (card , notecard .Notecard ):
3666 raise Exception ("Notecard object required" )
3767
@@ -40,6 +70,11 @@ def temp(card):
4070
4171
4272def version (card ):
73+ """Retrieve firmware version] information from the Notecard.
74+
75+ Returns:
76+ string: The result of the Notecard request.
77+ """
4378 if not isinstance (card , notecard .Notecard ):
4479 raise Exception ("Notecard object required" )
4580
@@ -48,6 +83,17 @@ def version(card):
4883
4984
5085def voltage (card , hours = None , offset = None , vmax = None , vmin = None ):
86+ """Retrive current and historical voltage info from the Notecard.
87+
88+ Args:
89+ hours (int): Number of hours to analyze.
90+ offset (int): Number of hours to offset.
91+ vmax (decimal): max voltage level to report.
92+ vmin (decimal): min voltage level to report.
93+
94+ Returns:
95+ string: The result of the Notecard request.
96+ """
5197 if not isinstance (card , notecard .Notecard ):
5298 raise Exception ("Notecard object required" )
5399
@@ -64,6 +110,14 @@ def voltage(card, hours=None, offset=None, vmax=None, vmin=None):
64110
65111
66112def wireless (card , mode = None ):
113+ """Retrive wireless modem info or customize modem behavior.
114+
115+ Args:
116+ mode (string): The wireless module mode to set.
117+
118+ Returns:
119+ string: The result of the Notecard request.
120+ """
67121 if not isinstance (card , notecard .Notecard ):
68122 raise Exception ("Notecard object required" )
69123
0 commit comments