Eclipse is an open-source Integrated Development Environment (IDE) supported by IBM. The mother site is @ www.eclipse.org. Eclipse is popular for Java project development. It also supports C/C++, PHP, Python, Perl, and other web project developments via extensible plug-ins. Eclipse is cross-platform and runs under Windows, Linux and Mac OS.
How to Install Eclipse C/C++ Development Tool (CDT) 8.1.2 for Eclipse 4.2.2 (Juno)
Step 0: Install MinGW GCC or Cygwin GCC
To use Eclipse for C/C++ programming, you need a C/C++ compiler. On Windows, you could install either MinGW GCC or Cygwin GCC. Choose MinGW if you are not sure, because MinGW is lighter and easier to install, but having less features.
- MinGW GCC: Read "How to Install MinGW".
- Cygwin GCC: Read "How to Install Cygwin". Make sure that you select "
gcc
", "g++
", "gdb
", and "make
" packages under the "Devel
" (Development) category - these packages are not part of the default installation.
Step 1: Install Eclipse C/C++ Development Tool (CDT)
Two ways to install CDT, depending on whether you have previously installed an Eclipse:
- If you have already installed "Eclipse for Java Developers" or other Eclipse packages, you could install the CDT plug-in as follows:
Launch Eclipse ⇒ Help ⇒ Install New Software ⇒ In "Work with" field, pull down the drop-down menu and select "Kepler - http://download.eclipse.org/releases/kepler" (or juno for Eclipse 4.2; or helios for Eclipse 3.7).
In "Name" box, expand "Programming Language" node ⇒ Check "C/C++ Development Tools" ⇒ "Next" ⇒ ... ⇒ "Finish". - If you have not install any Eclipse package, you could download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads, and unzip the downloaded file into a directory of your choice.
Step 2: Configuration
You do NOT need to do any configuration, as long as the Cygwin or MinGW binaries are included in the PATH
environment variable. CDT searches the PATH
to discover the C/C++ compilers.
Writing your First C/C++ Program in Eclipse
C++ Program
Step 0: Launch Eclipse
- Start Eclipse by running "
eclipse.exe
" in the Eclipse installed directory. - Choose an appropriate directory for your workspace (i.e., where you would like to save your works).
- If the "welcome" screen shows up, close it by clicking the "close" button.
Step 1: Create a new C++ Project
For each C++ application, you need to create a project to keep all the source codes, object files, executable files, and relevant resources.
To create a new C++ project:
- Choose "File" menu ⇒ "New" ⇒ Project... ⇒ C/C++ ⇒ C++ project.
- The "C++ Project" dialog pops up.
- In "Project name" field, enter "
FirstProject
". - In "Project Types" box, select "Executable" ⇒ "Empty Project".
- In "Toolchains" box, choose your compiler, e.g., "Cygwin GCC" or "MinGW GCC" ⇒ Next.
- In "Project name" field, enter "
- The "Select Configurations" dialog appears. Select both "Debug" and "Release" ⇒ Finish.
Step 2: Write a Hello-world C++ Program
- In the "Project Explorer" (leftmost panel) ⇒ Right-click on "
FirstProject
" (or use the "File" menu) ⇒ New ⇒ Source File. - The "New Source File" dialog pops up.
- In "Source file" field, enter "
Hello.cpp
". - Click "Finish".
- In "Source file" field, enter "
- The source file "
Hello.cpp
" opens on the editor panel (double-click on "test.cpp
" to open if necessary). Enter the following codes:#include <iostream> using namespace std; int main() { cout << "Hello, world!" << endl; return 0; }
If "Unresolved Inclusion Error"
If error "unresolved inclusion" appears next to #include
statement, the "include paths for headers" are not set properly. Select "Project" menu ⇒ Properties ⇒ C/C++ General ⇒ Paths and Symbols ⇒ In "Includes" tab:
For Cygwin GCC:
- "Add" the following directories to "GNU C", where
$CYGWIN_HOME
is your Cygwin installed directory:$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include-fixed
$CYGWIN_HOME\usr\include
$CYGWIN_HOME\usr\include\w32api
- "Add" the following directories to "GNU C++", where
$CYGWIN_HOME
is your Cygwin installed directory:$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include\c++
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include\c++\i686-pc-cygwin
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include\c++\backward
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include
$CYGWIN_HOME\lib\gcc\i686-pc-cygwin\4.5.x\include-fixed
$CYGWIN_HOME\usr\include
$CYGWIN_HOME\usr\include\w32api
For MinGW GCC:
- "Add" the following directories to "GNU C", where
$MINGW_HOME
is your MinGW installed directory:$MINGW_HOME\lib\gcc\mingw32\4.6.x\include
$MINGW_HOME\include
$MINGW_HOME\lib\gcc\mingw32\4.6.x\include-fixed
- "Add" the following directories to "GNU C++", where
$MINGW_HOME
is your Cygwin installed directory:$MINGW_HOME\lib\gcc\mingw32\4.6.x\include\c++
$MINGW_HOME\lib\gcc\mingw32\4.6.x\include\c++\mingw32
$MINGW_HOME\lib\gcc\mingw32\4.6.x\include\c++\backward
$MINGW_HOME\lib\gcc\mingw32\4.6.x\include
$MINGW_HOME\include
$MINGW_HOME\lib\gcc\mingw32\4.6.x\include-fixed
NOTE: To find the header paths, you can do a search on headers such as "stdio.h
" (for C) and "iostream
" (for C++) under the Cygwin or MinGW installed directory.
libmpfr4
" in cygwin.Step 3: Compile/Build
Right-click on the "FirstProject
" (or use the "Project" menu) ⇒ choose "Build Project" to compile and link the program.
Step 4: Run
To run the program, right-click on the "FirstProject
" (or anywhere on the source "test.cpp
", or select the "Run" menu) ⇒ Run As ⇒ Local C/C++ Application ⇒ (If ask, choose Cygwin's gdb debugger) ⇒ The output "Hello, world!" appears on the "Console" panel.
NOTE: You need to create a new C++ project for EACH of your programming problems. This is messy for writing toy programs!
C Program
Follow the same steps as above. Create a "C Project" (instead of "C++ Project"). Try the following Hello-world program (called "Hello.c
").
#include <stdio.h> int main() { printf("Hello, world!\n"); return 0; }
C++ Program with Makefile
In the previous examples, we use so-called managed-make where Eclipse automatically generated a makefile to build the program. We can also choose to write our own makefile for complete control of the building process.
Step 1: Create a C++ Makefile Project
From "File" menu ⇒ New ⇒ Project... ⇒ C/C++ ⇒ C++ project ⇒ In "Project name", enter "HelloCppMakefile
" ⇒ In "Project type", choose "Makefile Project ", "Empty Project" ⇒ In "Toolchains", choose "Cygwin GCC" or "MinGW GCC". Ignore the warning message.
Step 2: Write a C++ Program
Right-click on the project ⇒ New ⇒ Source File ⇒ In "Source file", enter "Hello.cpp
" ⇒ Enter the following source codes:
#include <iostream> using namespace std; int main() { cout << "Hello, world!" << endl; return 0; }
Step 3: Write a Makefile
Right-click on the project ⇒ New ⇒ File ⇒ In "File name", enter "makefile
" ⇒ Enter the following codes. Take note that you need to use a Tab (NOT Spaces) for the indent.
all: Hello.exe clean: rm Hello.o Hello.exe Hello.exe: Hello.o g++ -g -o Hello.exe Hello.o Hello.o: Hello.cpp g++ -c -g Hello.cpp
Step 4: Build the Project
Right-click on the project ⇒ Build Project.
Step 5: Run the Program
Right-click on the project ⇒ Run As ⇒ Local C/C++ Application.
[TODO] Write a makefile to compile toy-programs under one project.
Read the Documentation
At a minimum, you SHOULD browse through Eclipse's "Workbench User Guide" and "C/C++ Development User Guide" - accessible via the Eclipse's "Welcome" page or "Help" menu. This will save you many agonizing hours trying to figure out how to do some things later.
Debugging C/C++ Programs in Eclipse CDT
Able to use a graphics debugger to debug program is crucial in programming. It could save you countless of hours guessing on what went wrong.
Step 0: Write a C++ Program -
The following program computes and prints the factorial of n
(=1*2*3*...*n
). The program, however, has a logical error and produce a wrong answer for n
=20
("The Factorial of 20 is -2102132736
" - a negative number?!).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#include <iostream>
using namespace std;
int main() {
int n = 20;
int factorial = 1;
// n! = 1*2*3...*n
for (int i = 1; i <= n; i++) {
factorial *= i;
}
cout << "The Factorial of " << n << " is " << factorial << endl;
return 0;
}
|
The Factorial of 20 is -2102132736
Let us use the graphic debugger to debug the program.
Step 1: Set an Initial Breakpoint - A breakpoint suspends program execution for you to examine the internal states (e.g., value of variables) of the program. Before starting the debugger, you need to set at least one breakpoint to suspend the execution inside the program. Set a breakpoint at main()
function by double-clicking on the left-margin of the line containing main()
. A blue circle appears in the left-margin indicating a breakpoint is set at that line.
Step 2: Start Debugger - Right click on the project (or use the "Run" menu) ⇒ "Debug As" ⇒ "Local C/C++ Application" ⇒ choose "Yes" to switch into "Debug" perspective (A perspective is a particular arrangement of panels to suits a certain development task such as editing or debugging). The program begins execution but suspends its operation at the breakpoint, i.e., the main()
function.
As illustrated in the following diagram, the highlighted line (also pointed to by a blue arrow) indicates the statement to be executed in the next step.
Step 3: Step-Over and Watch the Variables and Outputs - Click the "Step Over" button (or select "Step Over" from "Run" menu) to single-step thru your program. At each of the step, examine the value of the variables (in the "Variable" panel) and the outputs produced by your program (in the "Console" Panel), if any. You can also place your cursor at any variable to inspect the content of the variable.
Single-stepping thru the program and watching the values of internal variables and the outputs produced is the ultimate mean in debugging programs - because it is exactly how the computer runs your program!
Step 4: Breakpoint, Run-To-Line, Resume and Terminate - As mentioned, a breakpoint suspends program execution and let you examine the internal states of the program. To set a breakpoint on a particular statement, double-click the left-margin of that line (or select "Toggle Breakpoint" from "Run" menu).
"Resume" continues the program execution, up to the next breakpoint, or till the end of the program.
"Single-step" thru a loop with a large count is time-consuming. You could set a breakpoint at the statement immediately outside the loop (e.g., Line 12 of the above program), and issue "Resume" to complete the loop.
Alternatively, you can place the cursor on a particular statement, and issue "Run-To-Line" from the "Run" menu to continue execution up to the line.
"Terminate" ends the debugging session. Always terminate your current debugging session using "Terminate" or "Resume" till the end of the program.
Step 5: Switching Back to C/C++ perspective - Click the "C/C++" perspective icon on the upper-right corner to switch back to the "C/C++" perspective for further programming (or "Window" menu ⇒ Open Perspective ⇒ C/C++).
I can's stress more that mastering the use of debugger is crucial in programming. Explore the features provided by the debuggers.
Other Debugger's Features
Modify the Value of a Variable: You can modify the value of a variable by entering a new value in the "Variable" panel. This is handy for temporarily modifying the behavior of a program, without changing the source code.
Step-Into and Step-Return: To debug a function, you need to use "Step-Into" to step into the first statement of the method. You could use "Step-Return" to return back to the caller, anywhere within the method. Alternatively, you could set a breakpoint inside a method.
NOTE: If you receive error message "Can't find a source file at /cygdrive/c
..." during debugging, you need to configure a mapping between "/cygdrive/c
" and "c:/
" (assuming that your program in kept in drive c. From "Window" ⇒ "Preferences"
⇒ "C/C++" ⇒ "Debug" ⇒ "Common Source Lookup Path", select "Add" ⇒ "Path Mapping".
Tips & Tricks
Read Eclipse for Java's Tips & Tricks for general tips in using Eclipse.
C/C++ Software Development Using GCC
- You can find the commands used in Eclipse CDT for build the project at "
<workspace>\.metadata\.plugins\org.eclipse.cdt.ui\global-build.log
". - Setting include-paths, library-paths, and libraries: When building the program, the compiler needs the header files to compile the source codes; the linker needs the libraries to resolve external references. The compiler searches the "include-paths" for the headers specified in
#include
directives. The linker searches the "library-paths" for "libraries" needed to link the program. In GCC, include-path is specified via-Idir
option or environment variableCPATH
. The library-path is specified via-Ldir
option, or environment variableLIBRARY_PATH
. The librarylibxxx.a
is specified via-lxxx
option (lowercase letter'l'
, without the prefixlib
and.a
extension).
In Eclipse CDT, you can set the include paths, library paths and libraries by right-click on the project ⇒ Properties ⇒ C/C++ General ⇒ Paths and Symbols ⇒ Under tabs "Includes", "Library Paths" and "Libraries". The settings are applicable to the selected project only.
To set the include paths and library paths for all the projects, set the environment variablesCPATH
andLIBRARY_PATH
. In Eclipse, choose "Window" ⇒ Preferences ⇒ C/C++ ⇒ Build ⇒ Environment.
Alternatively, copy the headers and libraries into system directories, and you can omit the include-paths and library-paths. - OpenGL with GLUT: For Cygwin, you need to install gcc, g++, gdb, make (under Devel category) and opengl, freeglut (under graphics category). The headers
gl.h
,glu.h
,glut.h
are kept in$cygwin\usr\include\w32api\GL
. Use#include <GL/gl__.h>
to include the headers. The librarieslibopengl32.a
libglu32.a
andlibglut32.a
are kept in$cygwin\lib\w32api
. To specify these libraries in linking, use-lopengl32
-lglu32
-lglut32
options (without thelib
prefix and.a
extension). - OpenGL with SDL: Download SDL from http://www.libsdl.org. Choose Development Libraries ⇒ win32 ⇒ mingw32 ⇒ Unzip. Copy the headers directory
SDL
(underinclude
) to$cygwin\usr\include\w32api
; copy all the library files inlib
into$cygwin\lib\w32api
; copy the run-time librarySDL.dll
(underbin
) intoWindows/System32
. In your program, include these two headers:#include <SDL/sdl.h>
and#include <SDL/sdl_opengl.h>
. For linking, add these libraries:-lSDL
-lSDLmain
. - #pragma Comment Directive: pragma comment directive, e.g.,
#pragma comment(lib, "opengl32.lib")
, is often used to include a particular library (same as-l
option). This system-dependent directive works on Windows's compiler, but NOT in GCC. - Error "multiple target patterns": There is a problem with GNU make (at
$Cygwin\bin\make.exe
). Replaced by this copy @ http://www.cmake.org/files/cygwin/make.exe. - fflush(stdout): The gcc library uses buffered I/O (in accordance with the C Specification). Output is only written out to the output stream after a newline character. You can flush the output with a
fflush()
. - Project name shall not include the word "setup": If you name your C/C++ project with a name including the word "
setup
", then the resultant "*setup*.exe
" will trigger UAC (User Authorization Control) and require administrator right to run. (This took me a few hours to figure out! Try renaming a "hello.exe
" to "mysetup.exe
".)
File I/O in Eclipse
Refer to Eclipse for Java's File IO.
REFERENCES & RESOURCES
- Eclipse's "C/C++ Development Tool User Guide", accessible via Eclipse's Help menu.
- GCC (GNU compilers) mother site @ http://gcc.gnu.org; GCC manual @ http://gcc.gnu.org/onlinedocs.
- An Introduction to GCC @ http://www.network-theory.co.uk/docs/gccintro/index.html.


The license history table accounts for multi-year/lifetime licenses by including
1 row for every year a license is held. The input data frame should only have 1 record
per customer-year (ensured by running rank_sale
beforehand).
make_history(sale_ranked, yrs, carry_vars = NULL, yrs_lapse = yrs, show_diagnostics = FALSE)
| sale_ranked | data frame: Sales table from which license history will be made; must include at least 3 variables (cust_id, year, duration) |
|---|---|
| yrs | numeric: Years in sales data (column 'year') from which to create license history |
| carry_vars | character: additional variables to carry over from previous year (for multi-year and lifetime licenses). |
| yrs_lapse | numeric: years to include in lapse calculation (defaults to yrs). If NULL, lapse will not be calculated (useful for mid-year results) |
| show_diagnostics | logical: If TRUE, will include intermediate variables in the
output dataset, necessary for running checks: |
The output data frame includes the following variables:
cust_id: Customer ID
year: License Year
carry_vars: One or more optional variables to include; ensures multi-year/lifetime records are complete in future years.
duration_run: A duration variable that accounts for multi-year/lifetimes.
lapse: Lapse next year? (1=Yes, 0=No). Only included if yrs_lapse != NULL
R3: R3 group this year (1=carried, 2=renewed, 3=reactivated, 4=recruited). Only included if more than 5 years are present.
Salic Function Reference: salic
Other license history functions: history_check
,
rank_sale
#>history <- make_history(sale_ranked, 2008:2018, "res") # history includes more rows than sale_ranked if multi-year/lifetimes are present left_join(count(history, year), count(sale_ranked, year), by = "year")#> # A tibble: 11 x 3 #> year n.x n.y #> <int> <int> <int> #> 1 2008 6393 6393 #> 2 2009 7591 7428 #> 3 2010 7775 7475 #> 4 2011 7819 7306 #> 5 2012 8243 7447 #> 6 2013 8273 7245 #> 7 2014 8970 7757 #> 8 2015 9086 7660 #> 9 2016 9161 7568 #> 10 2017 9389 7673 #> 11 2018 9206 7281


The Shape of Water
Dunkirk
Darkest Hour
Three Billboards Outside Ebbing, Missouri
Phantom Thread
I, Tonya
Get Out
Call Me by Your Name
Coco
A Fantastic Woman
Icarus
Heaven Is a Traffic Jam on the 405
The Silent Child
Dear Basketball
Blade Runner 2049
Flesh and Sand (Carne y arena)
Moonlight
La La Land
Hacksaw Ridge
Manchester by the Sea
Arrival
Fences
Fantastic Beasts and Where to Find Them
The Jungle Book
O.J.: Made in America
Piper
The Salesman
Sing
Suicide Squad
The White Helmets
Zootopia
Spotlight
Mad Max: Fury Road
The Revenant
Bridge of Spies
The Big Short
Room
The Hateful Eight
Ex Machina
Inside Out
Amy
Bear Story
A Girl in the River: The Price of Forgiveness
Son of Saul
Spectre
Stutterer
Birdman
The Grand Budapest Hotel
Whiplash
The Imitation Game
American Sniper
Boyhood
Interstellar
The Theory of Everything
Ida
Selma
Citizenfour
Big Hero 6
Crisis Hotline: Veterans Press 1
The Phone Call
Still Alice
Feast
12 Years a Slave
Gravity
Dallas Buyers Club
Frozen
The Great Gatsby
Her
Blue Jasmine
Mr Hublot
The Lady in Number 6
Helium
The Great Beauty
20 Feet from Stardom
Argo
Life of Pi
Les Miserables
Lincoln
Django Unchained
Skyfall
Silver Linings Playbook
Zero Dark Thirty
Amour
Anna Karenina
Paperman
Brave
Searching for Sugar Man
Inocente
Curfew
The Artist
Hugo
The Iron Lady
The Descendants
The Girl with the Dragon Tattoo
Midnight in Paris
The Help
A Separation
The Fantastic Flying Books of Mr. Morris Lessmore
The Shore
Undefeated
The Muppets
Saving Face
Beginners
Rango


|
SmartMeshSDK
|
Public class for IP mote connector, over Serial. More...
Public Member Functions | |
| def | dn_setParameter_macAddress |
| This command allows user to overwrite the manufacturer-assigned MAC address of the mote. More... | |
| def | dn_setParameter_joinKey |
| The setParameter<joinKey> command may be used to set the join key in mote's persistent storage. More... | |
| def | dn_setParameter_networkId |
| This command may be used to set the Network ID of the mote. More... | |
| def | dn_setParameter_txPower |
| The setParameter<txPower> command sets the mote output power. More... | |
| def | dn_setParameter_joinDutyCycle |
| The setParameter<joinDutyCycle> command allows the microprocessor to control the ratio of active listen time to doze time (a low-power radio state) during the period when the mote is searching for the network. More... | |
| def | dn_setParameter_eventMask |
| The setParameter<eventMask> command allows the microprocessor to selectively subscribe to event notifications. More... | |
| def | dn_setParameter_OTAPLockout |
| This command allows the microprocessor to control whether Over-The-Air Programming (OTAP) of motes is allowed. More... | |
| def | dn_setParameter_routingMode |
| This command allows the microprocessor to control whether the mote will become a router once joined the network. More... | |
| def | dn_setParameter_powerSrcInfo |
| This command allows the microprocessor to configure power source information on the device. More... | |
| def | dn_setParameter_advKey |
| Sets the Advertisement MIC key - this key is used to authenticate advertisements, and can be set per vendor/installation to prevent unauthorized devices from being able to respond to advertisements. More... | |
| def | dn_setParameter_autoJoin |
| This command allows the microprocessor to change between automatic and manual joining by the mote's networking stack. More... | |
| def | dn_setParameter_antGain |
| The setParameter<antGain> command sets the antenna gain of the system (to properly calculate radiated power). More... | |
| def | dn_setParameter_euCompliantMode |
| The setParameter<euCompliantMode> commandmay be used to set the EN 300 328 compliance mode that is used by the device. More... | |
| def | dn_getParameter_macAddress |
| This command returns the MAC address of the device. More... | |
| def | dn_getParameter_networkId |
| This command returns the network id stored in mote's persistent storage. More... | |
| def | dn_getParameter_txPower |
| Get the radio output power in dBm, excluding any antenna gain. More... | |
| def | dn_getParameter_joinDutyCycle |
| This command allows user to retrieve current value of joinDutyCycle parameter. More... | |
| def | dn_getParameter_eventMask |
| getParameter<eventMask> allows the microprocessor to read the currently subscribed-to event types. More... | |
| def | dn_getParameter_moteInfo |
| The getParameter<moteInfo> command returns static information about the moteshardware and network stack software. More... | |
| def | dn_getParameter_netInfo |
| The getParameter<networkInfo> command may be used to retrieve the mote's network-related parameters. More... | |
| def | dn_getParameter_moteStatus |
| The getParameter<moteStatus> command is used to retrieve current mote state andother dynamic information. More... | |
| def | dn_getParameter_time |
| The getParameter<time> command may be used to request the current time on the mote. More... | |
| def | dn_getParameter_charge |
| The getParameter<charge> command retrieves the charge consumption of the motesince the last reset. More... | |
| def | dn_getParameter_testRadioRxStats |
| The getParameter<testRadioRxStats> command retrieves statistics for the latest radio test performed using the testRadioRx command. More... | |
| def | dn_getParameter_OTAPLockout |
| This command reads the current state of OTAP lockout, i.e. More... | |
| def | dn_getParameter_moteId |
| This command retrieves the mote's Mote ID. More... | |
| def | dn_getParameter_ipv6Address |
| This command allows the microprocessor to read IPV6 address assigned to the mote. More... | |
| def | dn_getParameter_routingMode |
| This command allows the microprocessor to retrieve the current routing mode of the mote. More... | |
| def | dn_getParameter_appInfo |
| Get the application (as opposed to the network stack) version information. More... | |
| def | dn_getParameter_powerSrcInfo |
| This command allows the microprocessor to read a mote's power source settings. More... | |
| def | dn_getParameter_autoJoin |
| This command allows the microprocessor to retrieve the current autoJoin setting. More... | |
| def | dn_getParameter_antGain |
| The getParameter<antGain> command retrieves the antenna gain used by the system (to properly calculate radiated power). More... | |
| def | dn_getParameter_euCompliantMode |
| The getParameter<euCompliantMode> commandmay be used to retrieve the EN 300 328 compliance mode that is used by the device. More... | |
| def | dn_join |
| The join command requests that mote start searching for the network and attempt to join.The mote must be in the Idle state or the Promiscuous Listen state(see search) for this command to be valid. More... | |
| def | dn_disconnect |
| The disconnect command requests that the mote initiate disconnection from the network. More... | |
| def | dn_reset |
| The reset command initiates a soft-reset of the device. More... | |
| def | dn_lowPowerSleep |
| The lowPowerSleep command shuts down all peripherals and places the mote into deep sleep mode. More... | |
| def | dn_testRadioRx |
| The testRadioRx command clears all previously collected statistics and initiates a test of radio reception for the specified channel and duration. More... | |
| def | dn_clearNV |
| The clearNV command resets the motes non-volatile memory (NV) to its factory-default state. More... | |
| def | dn_requestService |
| The requestService command may be used to request a new or changed service level to a destination device in the mesh. More... | |
| def | dn_getServiceInfo |
| The getServiceInfo command returns information about the service currently allocated to the mote. More... | |
| def | dn_openSocket |
| The openSocket command creates an endpoint for IP communication and returns an ID for the socket. More... | |
| def | dn_closeSocket |
| Close the previously open socket. More... | |
| def | dn_bindSocket |
| Bind a previously opened socket to a port. More... | |
| def | dn_sendTo |
| Send a packet into the network. More... | |
| def | dn_search |
| The search command requests that mote start listening for advertisements and report those heard from any network withoutattempting to join. More... | |
| def | dn_testRadioTxExt |
| The testRadioTxExt command allows the microprocessor to initiate a radio transmission test. More... | |
| def | dn_zeroize |
| Zeroize (zeroise) command erases flash area that is used to store configuration parameters, such as join keys. More... | |
| def | dn_socketInfo |
| Retrieve information about a socket. More... | |
| def | getNotification |
| Get a notification from the notification queue, and returns it properly formatted. More... | |
Static Public Attributes | |
| tuple | Tuple_dn_setParameter_macAddress = collections.namedtuple("Tuple_dn_setParameter_macAddress", ['RC']) |
| The named tuple returned by the dn_setParameter_macAddress() function. More... | |
| tuple | Tuple_dn_setParameter_joinKey = collections.namedtuple("Tuple_dn_setParameter_joinKey", ['RC']) |
| The named tuple returned by the dn_setParameter_joinKey() function. More... | |
| tuple | Tuple_dn_setParameter_networkId = collections.namedtuple("Tuple_dn_setParameter_networkId", ['RC']) |
| The named tuple returned by the dn_setParameter_networkId() function. More... | |
| tuple | Tuple_dn_setParameter_txPower = collections.namedtuple("Tuple_dn_setParameter_txPower", ['RC']) |
| The named tuple returned by the dn_setParameter_txPower() function. More... | |
| tuple | Tuple_dn_setParameter_joinDutyCycle = collections.namedtuple("Tuple_dn_setParameter_joinDutyCycle", ['RC']) |
| The named tuple returned by the dn_setParameter_joinDutyCycle() function. More... | |
| tuple | Tuple_dn_setParameter_eventMask = collections.namedtuple("Tuple_dn_setParameter_eventMask", ['RC']) |
| The named tuple returned by the dn_setParameter_eventMask() function. More... | |
| tuple | Tuple_dn_setParameter_OTAPLockout = collections.namedtuple("Tuple_dn_setParameter_OTAPLockout", ['RC']) |
| The named tuple returned by the dn_setParameter_OTAPLockout() function. More... | |
| tuple | Tuple_dn_setParameter_routingMode = collections.namedtuple("Tuple_dn_setParameter_routingMode", ['RC']) |
| The named tuple returned by the dn_setParameter_routingMode() function. More... | |
| tuple | Tuple_dn_setParameter_powerSrcInfo = collections.namedtuple("Tuple_dn_setParameter_powerSrcInfo", ['RC']) |
| The named tuple returned by the dn_setParameter_powerSrcInfo() function. More... | |
| tuple | Tuple_dn_setParameter_advKey = collections.namedtuple("Tuple_dn_setParameter_advKey", ['RC']) |
| The named tuple returned by the dn_setParameter_advKey() function. More... | |
| tuple | Tuple_dn_setParameter_autoJoin = collections.namedtuple("Tuple_dn_setParameter_autoJoin", ['RC']) |
| The named tuple returned by the dn_setParameter_autoJoin() function. More... | |
| tuple | Tuple_dn_setParameter_antGain = collections.namedtuple("Tuple_dn_setParameter_antGain", ['RC']) |
| The named tuple returned by the dn_setParameter_antGain() function. More... | |
| tuple | Tuple_dn_setParameter_euCompliantMode = collections.namedtuple("Tuple_dn_setParameter_euCompliantMode", ['RC']) |
| The named tuple returned by the dn_setParameter_euCompliantMode() function. More... | |
| tuple | Tuple_dn_getParameter_macAddress = collections.namedtuple("Tuple_dn_getParameter_macAddress", ['RC', 'macAddress']) |
| The named tuple returned by the dn_getParameter_macAddress() function. More... | |
| tuple | Tuple_dn_getParameter_networkId = collections.namedtuple("Tuple_dn_getParameter_networkId", ['RC', 'networkId']) |
| The named tuple returned by the dn_getParameter_networkId() function. More... | |
| tuple | Tuple_dn_getParameter_txPower = collections.namedtuple("Tuple_dn_getParameter_txPower", ['RC', 'txPower']) |
| The named tuple returned by the dn_getParameter_txPower() function. More... | |
| tuple | Tuple_dn_getParameter_joinDutyCycle = collections.namedtuple("Tuple_dn_getParameter_joinDutyCycle", ['RC', 'joinDutyCycle']) |
| The named tuple returned by the dn_getParameter_joinDutyCycle() function. More... | |
| tuple | Tuple_dn_getParameter_eventMask = collections.namedtuple("Tuple_dn_getParameter_eventMask", ['RC', 'eventMask']) |
| The named tuple returned by the dn_getParameter_eventMask() function. More... | |
| tuple | Tuple_dn_getParameter_moteInfo = collections.namedtuple("Tuple_dn_getParameter_moteInfo", ['RC', 'apiVersion', 'serialNumber', 'hwModel', 'hwRev', 'swVerMajor', 'swVerMinor', 'swVerPatch', 'swVerBuild', 'bootSwVer']) |
| The named tuple returned by the dn_getParameter_moteInfo() function. More... | |
| tuple | Tuple_dn_getParameter_netInfo = collections.namedtuple("Tuple_dn_getParameter_netInfo", ['RC', 'macAddress', 'moteId', 'networkId', 'slotSize']) |
| The named tuple returned by the dn_getParameter_netInfo() function. More... | |
| tuple | Tuple_dn_getParameter_moteStatus = collections.namedtuple("Tuple_dn_getParameter_moteStatus", ['RC', 'state', 'reserved_0', 'reserved_1', 'numParents', 'alarms', 'reserved_2']) |
| The named tuple returned by the dn_getParameter_moteStatus() function. More... | |
| tuple | Tuple_dn_getParameter_time = collections.namedtuple("Tuple_dn_getParameter_time", ['RC', 'upTime', 'utcSecs', 'utcUsecs', 'asn', 'asnOffset']) |
| The named tuple returned by the dn_getParameter_time() function. More... | |
| tuple | Tuple_dn_getParameter_charge = collections.namedtuple("Tuple_dn_getParameter_charge", ['RC', 'qTotal', 'upTime', 'tempInt', 'tempFrac']) |
| The named tuple returned by the dn_getParameter_charge() function. More... | |
| tuple | Tuple_dn_getParameter_testRadioRxStats = collections.namedtuple("Tuple_dn_getParameter_testRadioRxStats", ['RC', 'rxOk', 'rxFailed']) |
| The named tuple returned by the dn_getParameter_testRadioRxStats() function. More... | |
| tuple | Tuple_dn_getParameter_OTAPLockout = collections.namedtuple("Tuple_dn_getParameter_OTAPLockout", ['RC', 'mode']) |
| The named tuple returned by the dn_getParameter_OTAPLockout() function. More... | |
| tuple | Tuple_dn_getParameter_moteId = collections.namedtuple("Tuple_dn_getParameter_moteId", ['RC', 'moteId']) |
| The named tuple returned by the dn_getParameter_moteId() function. More... | |
| tuple | Tuple_dn_getParameter_ipv6Address = collections.namedtuple("Tuple_dn_getParameter_ipv6Address", ['RC', 'ipv6Address']) |
| The named tuple returned by the dn_getParameter_ipv6Address() function. More... | |
| tuple | Tuple_dn_getParameter_routingMode = collections.namedtuple("Tuple_dn_getParameter_routingMode", ['RC', 'routingMode']) |
| The named tuple returned by the dn_getParameter_routingMode() function. More... | |
| tuple | Tuple_dn_getParameter_appInfo = collections.namedtuple("Tuple_dn_getParameter_appInfo", ['RC', 'vendorId', 'appId', 'appVer']) |
| The named tuple returned by the dn_getParameter_appInfo() function. More... | |
| tuple | Tuple_dn_getParameter_powerSrcInfo = collections.namedtuple("Tuple_dn_getParameter_powerSrcInfo", ['RC', 'maxStCurrent', 'minLifetime', 'currentLimit_0', 'dischargePeriod_0', 'rechargePeriod_0', 'currentLimit_1', 'dischargePeriod_1', 'rechargePeriod_1', 'currentLimit_2', 'dischargePeriod_2', 'rechargePeriod_2']) |
| The named tuple returned by the dn_getParameter_powerSrcInfo() function. More... | |
| tuple | Tuple_dn_getParameter_autoJoin = collections.namedtuple("Tuple_dn_getParameter_autoJoin", ['RC', 'autoJoin']) |
| The named tuple returned by the dn_getParameter_autoJoin() function. More... | |
| tuple | Tuple_dn_getParameter_antGain = collections.namedtuple("Tuple_dn_getParameter_antGain", ['RC', 'antGain']) |
| The named tuple returned by the dn_getParameter_antGain() function. More... | |
| tuple | Tuple_dn_getParameter_euCompliantMode = collections.namedtuple("Tuple_dn_getParameter_euCompliantMode", ['RC', 'compMode']) |
| The named tuple returned by the dn_getParameter_euCompliantMode() function. More... | |
| tuple | Tuple_dn_join = collections.namedtuple("Tuple_dn_join", ['RC']) |
| The named tuple returned by the dn_join() function. More... | |
| tuple | Tuple_dn_disconnect = collections.namedtuple("Tuple_dn_disconnect", ['RC']) |
| The named tuple returned by the dn_disconnect() function. More... | |
| tuple | Tuple_dn_reset = collections.namedtuple("Tuple_dn_reset", ['RC']) |
| The named tuple returned by the dn_reset() function. More... | |
| tuple | Tuple_dn_lowPowerSleep = collections.namedtuple("Tuple_dn_lowPowerSleep", ['RC']) |
| The named tuple returned by the dn_lowPowerSleep() function. More... | |
| tuple | Tuple_dn_testRadioRx = collections.namedtuple("Tuple_dn_testRadioRx", ['RC']) |
| The named tuple returned by the dn_testRadioRx() function. More... | |
| tuple | Tuple_dn_clearNV = collections.namedtuple("Tuple_dn_clearNV", ['RC']) |
| The named tuple returned by the dn_clearNV() function. More... | |
| tuple | Tuple_dn_requestService = collections.namedtuple("Tuple_dn_requestService", ['RC']) |
| The named tuple returned by the dn_requestService() function. More... | |
| tuple | Tuple_dn_getServiceInfo = collections.namedtuple("Tuple_dn_getServiceInfo", ['RC', 'destAddr', 'type', 'state', 'value']) |
| The named tuple returned by the dn_getServiceInfo() function. More... | |
| tuple | Tuple_dn_openSocket = collections.namedtuple("Tuple_dn_openSocket", ['RC', 'socketId']) |
| The named tuple returned by the dn_openSocket() function. More... | |
| tuple | Tuple_dn_closeSocket = collections.namedtuple("Tuple_dn_closeSocket", ['RC']) |
| The named tuple returned by the dn_closeSocket() function. More... | |
| tuple | Tuple_dn_bindSocket = collections.namedtuple("Tuple_dn_bindSocket", ['RC']) |
| The named tuple returned by the dn_bindSocket() function. More... | |
| tuple | Tuple_dn_sendTo = collections.namedtuple("Tuple_dn_sendTo", ['RC']) |
| The named tuple returned by the dn_sendTo() function. More... | |
| tuple | Tuple_dn_search = collections.namedtuple("Tuple_dn_search", ['RC']) |
| The named tuple returned by the dn_search() function. More... | |
| tuple | Tuple_dn_testRadioTxExt = collections.namedtuple("Tuple_dn_testRadioTxExt", ['RC']) |
| The named tuple returned by the dn_testRadioTxExt() function. More... | |
| tuple | Tuple_dn_zeroize = collections.namedtuple("Tuple_dn_zeroize", ['RC']) |
| The named tuple returned by the dn_zeroize() function. More... | |
| tuple | Tuple_dn_socketInfo = collections.namedtuple("Tuple_dn_socketInfo", ['RC', 'index', 'socketId', 'protocol', 'bindState', 'port']) |
| The named tuple returned by the dn_socketInfo() function. More... | |
| dictionary | notifTupleTable = {} |
| Dictionary of all notification tuples. More... | |
| string | TIMEINDICATION = "timeIndication" |
| TIMEINDICATION notification. More... | |
| string | EVENTS = "events" |
| EVENTS notification. More... | |
| string | RECEIVE = "receive" |
| RECEIVE notification. More... | |
| string | MACRX = "macRx" |
| MACRX notification. More... | |
| string | TXDONE = "txDone" |
| TXDONE notification. More... | |
| string | ADVRECEIVED = "advReceived" |
| ADVRECEIVED notification. More... | |
Public class for IP mote connector, over Serial.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_bindSocket | ( | self, | |
| socketId, | |||
| port | |||
| ) |
Bind a previously opened socket to a port.
When a socket is created, it is only given a protocol family, but not assigned a port. This association must be performed before the socket can accept connections from other hosts.
| socketId | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| port | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_clearNV | ( | self | ) |
The clearNV command resets the motes non-volatile memory (NV) to its factory-default state.
See User Guide for detailed information about the default values. Since many parameters are read by the mote only at power-up, this command should be followed up by mote reset.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_closeSocket | ( | self, | |
| socketId | |||
| ) |
Close the previously open socket.
| socketId | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_disconnect | ( | self | ) |
The disconnect command requests that the mote initiate disconnection from the network.
After disconnection completes, the mote will generate a disconnected event, and proceed to reset. If the mote is not in the network, the disconnected event will be generated immediately. This command may be issued at any time.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_antGain | ( | self | ) |
The getParameter<antGain> command retrieves the antenna gain used by the system (to properly calculate radiated power).
Defaults to 2 dBi.
Note: This parameter is available indevices running mote software>=1.4.x
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_appInfo | ( | self | ) |
Get the application (as opposed to the network stack) version information.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_autoJoin | ( | self | ) |
This command allows the microprocessor to retrieve the current autoJoin setting.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_charge | ( | self | ) |
The getParameter<charge> command retrieves the charge consumption of the motesince the last reset.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_euCompliantMode | ( | self | ) |
The getParameter<euCompliantMode> commandmay be used to retrieve the EN 300 328 compliance mode that is used by the device.
When enabled, the mote may skip some transmit opportunities to remain within average power limits. Motes below +10 dBm radiated power do not need to duty cycle to meet EN 300 328 requirements.
Note: This parameter is available indevices running mote software>=1.4.x
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_eventMask | ( | self | ) |
getParameter<eventMask> allows the microprocessor to read the currently subscribed-to event types.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_ipv6Address | ( | self | ) |
This command allows the microprocessor to read IPV6 address assigned to the mote.
Before the mote has an assigned address it will return all 0s.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_joinDutyCycle | ( | self | ) |
This command allows user to retrieve current value of joinDutyCycle parameter.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_macAddress | ( | self | ) |
This command returns the MAC address of the device.
By default, the MAC address returned is the EUI64 address of the device assigned by mote manufacturer, but it may be overwritten using the setParameter<macAddress> command.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_moteId | ( | self | ) |
This command retrieves the mote's Mote ID.
If the mote is not in the network, value of 0 is returned.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_moteInfo | ( | self | ) |
The getParameter<moteInfo> command returns static information about the moteshardware and network stack software.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_moteStatus | ( | self | ) |
The getParameter<moteStatus> command is used to retrieve current mote state andother dynamic information.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_netInfo | ( | self | ) |
The getParameter<networkInfo> command may be used to retrieve the mote's network-related parameters.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_networkId | ( | self | ) |
This command returns the network id stored in mote's persistent storage.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_OTAPLockout | ( | self | ) |
This command reads the current state of OTAP lockout, i.e.
whether over-the-air upgrades of software are permitted on this mote.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_powerSrcInfo | ( | self | ) |
This command allows the microprocessor to read a mote's power source settings.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_routingMode | ( | self | ) |
This command allows the microprocessor to retrieve the current routing mode of the mote.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_testRadioRxStats | ( | self | ) |
The getParameter<testRadioRxStats> command retrieves statistics for the latest radio test performed using the testRadioRx command.
The statistics show the number of good and bad packets (CRC failures) received during the test
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_time | ( | self | ) |
The getParameter<time> command may be used to request the current time on the mote.
The mote reports time at the moment it is processing the command, so the information includes variable delay. For more precise time information consider using TIMEn pin (see timeIndication).
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getParameter_txPower | ( | self | ) |
Get the radio output power in dBm, excluding any antenna gain.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_getServiceInfo | ( | self, | |
| destAddr, | |||
| type | |||
| ) |
The getServiceInfo command returns information about the service currently allocated to the mote.
| destAddr | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| type | 1-byte field formatted as a int. This field can only take one of the following values:
|
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_join | ( | self | ) |
The join command requests that mote start searching for the network and attempt to join.The mote must be in the Idle state or the Promiscuous Listen state(see search) for this command to be valid.
Note that the join time will be affected by the maximum current setting.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_lowPowerSleep | ( | self | ) |
The lowPowerSleep command shuts down all peripherals and places the mote into deep sleep mode.
The command executes after the mote sends its response. The mote enters deep sleep within two seconds after the command executes. The command may be issued at any time and will cause the mote to interrupt all in-progress network operation. To achieve a graceful disconnect, use the disconnect command before using the lowPowerSleep command. A hardware reset is required to bring a mote out of deep sleep mode.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_openSocket | ( | self, | |
| protocol | |||
| ) |
The openSocket command creates an endpoint for IP communication and returns an ID for the socket.
| protocol | 1-byte field formatted as a int. This field can only take one of the following values:
|
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_requestService | ( | self, | |
| destAddr, | |||
| serviceType, | |||
| value | |||
| ) |
The requestService command may be used to request a new or changed service level to a destination device in the mesh.
This command may only be used to update the service to a device with an existing connection (session).
Whenever a change in bandwidth assignment occurs, the application receives a serviceChanged event that it can use as a trigger to read the new service allocation.
| destAddr | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| serviceType | 1-byte field formatted as a int. This field can only take one of the following values:
|
| value | 4-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_reset | ( | self | ) |
The reset command initiates a soft-reset of the device.
The device will initiate the reset sequence shortly after sending out the response to this command. Resetting a mote directly can adversely impact its descendants; to disconnect gracefully from the network, use the disconnect command
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_search | ( | self | ) |
The search command requests that mote start listening for advertisements and report those heard from any network withoutattempting to join.
This is called the Promiscuous Listen state. The mote must be in the Idle state for this command to be valid. The search state can be exited by issuing the join command or the reset command.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_sendTo | ( | self, | |
| socketId, | |||
| destIP, | |||
| destPort, | |||
| serviceType, | |||
| priority, | |||
| packetId, | |||
| payload | |||
| ) |
Send a packet into the network.
If the command returns RC_OK, the mote has accepted the packet and hasqueuedit up for transmission. A txDone notification will be issued when the packet has been sent, if and only if the packet ID passed in this command is different from 0xffff. You can set the packet ID to any value. The notification will contain the packet ID of the packet just sent, allowing association of the notification with a particular packet. The destination port should be in the range 0xF0B8-F0BF (61624-61631) to maximize payload.
| socketId | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| destIP | 16-byte field formatted as a hex. There is no restriction on the value of this field. |
| destPort | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| serviceType | 1-byte field formatted as a int. This field can only take one of the following values:
|
| priority | 1-byte field formatted as a int. This field can only take one of the following values:
|
| packetId | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| payload | None-byte field formatted as a hex. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_advKey | ( | self, | |
| advKey | |||
| ) |
Sets the Advertisement MIC key - this key is used to authenticate advertisements, and can be set per vendor/installation to prevent unauthorized devices from being able to respond to advertisements.
If changed, it must match that set on the corresponding AP (using mset on the manager CLI) in order for the mote to join. It can be reset to default via the clearNV command.
| advKey | 16-byte field formatted as a hex. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_antGain | ( | self, | |
| antGain | |||
| ) |
The setParameter<antGain> command sets the antenna gain of the system (to properly calculate radiated power).
Defaults to 2 dBi if not set.
Note: This parameter is available indevices running mote software>=1.4.x
| antGain | 1-byte field formatted as a ints. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_autoJoin | ( | self, | |
| mode | |||
| ) |
This command allows the microprocessor to change between automatic and manual joining by the mote's networking stack.
In manual mode, an explicit join command from the application is required to initiate joining. This setting is persistent and takes effect after mote reset.
Note that auto join mode must not be set if the application is also configured to join (e.g combining 'auto join' with 'master' mode will result in mote not joining).
| mode | 1-byte field formatted as a bool. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_euCompliantMode | ( | self, | |
| euCompliantMode | |||
| ) |
The setParameter<euCompliantMode> commandmay be used to set the EN 300 328 compliance mode that is used by the device.
When enabled, the mote may skip some transmit opportunities to remain within average power limits. Motes below +10 dBm radiated power do not need to duty cycle to meet EN 300 328 requirements.
Note: This parameter is available indevices running mote software>=1.4.x
| euCompliantMode | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_eventMask | ( | self, | |
| eventMask | |||
| ) |
The setParameter<eventMask> command allows the microprocessor to selectively subscribe to event notifications.
The default value of eventMask at mote reset is all 1s - all events are enabled. This setting is not persistent.
New event type may be added in future revisions of mote software. It is recommended that the client code only subscribe to known events and gracefully ignore all unknown events.
| eventMask | 4-byte field formatted as a hex. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_joinDutyCycle | ( | self, | |
| dutyCycle | |||
| ) |
The setParameter<joinDutyCycle> command allows the microprocessor to control the ratio of active listen time to doze time (a low-power radio state) during the period when the mote is searching for the network.
If you desire a faster join time at the risk of higher power consumption, use the setParameter<joinDutyCycle> command to increase the join duty cycle up to 100%. This setting is persistent and takes effect immediately if the device is searching for network.
| dutyCycle | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_joinKey | ( | self, | |
| joinKey | |||
| ) |
The setParameter<joinKey> command may be used to set the join key in mote's persistent storage.
Join keys are used by motes to establish secure connection with the network. The join key is used at next join.
Reading the joinKey parameter is prohibited for security reasons.
| joinKey | 16-byte field formatted as a hex. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_macAddress | ( | self, | |
| macAddress | |||
| ) |
This command allows user to overwrite the manufacturer-assigned MAC address of the mote.
The new value takes effect after the mote resets.
| macAddress | 8-byte field formatted as a hex. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_networkId | ( | self, | |
| networkId | |||
| ) |
This command may be used to set the Network ID of the mote.
This setting is persistent and is used on next join attempt.
As of version 1.4.x, a network ID of 0xFFFF can be used to indicate that the mote should join the first network heard.
0xFFFF is never used over the air as a valid network ID - you should not set the Manager's network ID to 0xFFFF.
| networkId | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_OTAPLockout | ( | self, | |
| mode | |||
| ) |
This command allows the microprocessor to control whether Over-The-Air Programming (OTAP) of motes is allowed.
This setting is persistent and takes effect immediately.
| mode | 1-byte field formatted as a bool. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_powerSrcInfo | ( | self, | |
| maxStCurrent, | |||
| minLifetime, | |||
| currentLimit_0, | |||
| dischargePeriod_0, | |||
| rechargePeriod_0, | |||
| currentLimit_1, | |||
| dischargePeriod_1, | |||
| rechargePeriod_1, | |||
| currentLimit_2, | |||
| dischargePeriod_2, | |||
| rechargePeriod_2 | |||
| ) |
This command allows the microprocessor to configure power source information on the device.
This setting is persistent and is used at network join time.
| maxStCurrent | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| minLifetime | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| currentLimit_0 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| dischargePeriod_0 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| rechargePeriod_0 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| currentLimit_1 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| dischargePeriod_1 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| rechargePeriod_1 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| currentLimit_2 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| dischargePeriod_2 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| rechargePeriod_2 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_routingMode | ( | self, | |
| mode | |||
| ) |
This command allows the microprocessor to control whether the mote will become a router once joined the network.
If disabled, the manager will keep the mote a leaf node.
| mode | 1-byte field formatted as a bool. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_setParameter_txPower | ( | self, | |
| txPower | |||
| ) |
The setParameter<txPower> command sets the mote output power.
This setting is persistent. The command may be issued at any time and takes effect on next transmission. Refer to product datasheets for supported RF output power values. For example, if the mote has a typical RF output power of +8 dBm when the power amplifier (PA) is enabled, then set the txPower parameter to 8 to enable the PA. Similarly, if the mote has a typical RF output power of 0 dBm when the PA is disabled, then set the txPower parameter to 0 to turn off the PA.
| txPower | 1-byte field formatted as a ints. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_socketInfo | ( | self, | |
| index | |||
| ) |
Retrieve information about a socket.
(Available in IP Mote >= 1.4.0)
| index | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_testRadioRx | ( | self, | |
| channelMask, | |||
| time, | |||
| stationId | |||
| ) |
The testRadioRx command clears all previously collected statistics and initiates a test of radio reception for the specified channel and duration.
During the test, the mote keeps statistics about the number of packets received (with and without error). The test results may be retrieved using the getParameter<testRadioRxStats> command. The testRadioRx command may only be issued in Idle mode. The mote must be reset (either hardware or software reset) after radio tests are complete and prior to joining.
Station ID is available in IP mote >= 1.4, and WirelessHART mote >= 1.1.2. The station ID is a user selectable value used to isolate traffic if multiple tests are running in the same radio space. It must be set to match the station ID used by the transmitter.
Channel numbering is 0-15, corresponding to IEEE 2.4 GHz channels 11-26.
| channelMask | 2-byte field formatted as a hex. There is no restriction on the value of this field. |
| time | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| stationId | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_testRadioTxExt | ( | self, | |
| testType, | |||
| chanMask, | |||
| repeatCnt, | |||
| txPower, | |||
| seqSize, | |||
| pkLen_1, | |||
| delay_1, | |||
| pkLen_2, | |||
| delay_2, | |||
| pkLen_3, | |||
| delay_3, | |||
| pkLen_4, | |||
| delay_4, | |||
| pkLen_5, | |||
| delay_5, | |||
| pkLen_6, | |||
| delay_6, | |||
| pkLen_7, | |||
| delay_7, | |||
| pkLen_8, | |||
| delay_8, | |||
| pkLen_9, | |||
| delay_9, | |||
| pkLen_10, | |||
| delay_10, | |||
| stationId | |||
| ) |
The testRadioTxExt command allows the microprocessor to initiate a radio transmission test.
This command may only be issued prior to the mote joining the network. Three types of transmission tests are supported:
In a packet transmission test, the mote generates a repeatCnt number of packet sequences. Each sequence consists of up to 10 packets with configurable size and delays. Each packet starts with a PHY preamble (5 bytes), followed by a PHY length field (1 byte), followed by data payload of up to 125 bytes, and finally a 2-byte 802.15.4 CRC at the end. Byte 0 of the payload contains stationId of the sender. Bytes 1 and 2 contain the packet number (in big-endian format) that increments with every packet transmitted. Bytes 3..N contain a counter (from 0..N-3) that increments with every byte inside payload. Transmissions occur on the set of channels defined by chanMask , selected inpseudo-randomorder.
In a continuous modulation test, the mote generates continuous pseudo-random modulated signal, centered at the specified channel. The test is stopped by resetting the mote.
In a continuous wave test, the mote generates an unmodulated tone, centered at the specified channel. The test tone is stopped by resetting the mote.
The testRadioTxExt command may only be issued when the mote is in Idle mode, prior to its joining the network. The mote must be reset (either hardware or software reset) after radio tests are complete and prior to joining.
The station ID is a user selectable value. It is used in packet tests so that a receiver can identify packets from this device in cases where there may be multiple tests running in the same radio space. This field is not used for CM or CW tests. See testRadioRX (SmartMesh IP) or testRadioRxExt (SmartMesh WirelessHART).
Channel numbering is 0-15, corresponding to IEEE 2.4 GHz channels 11-26.
| testType | 1-byte field formatted as a int. This field can only take one of the following values:
|
| chanMask | 2-byte field formatted as a hex. There is no restriction on the value of this field. |
| repeatCnt | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| txPower | 1-byte field formatted as a ints. There is no restriction on the value of this field. |
| seqSize | 1-byte field formatted as a int. This field can only take one of the following values:
|
| pkLen_1 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_1 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_2 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_2 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_3 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_3 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_4 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_4 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_5 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_5 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_6 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_6 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_7 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_7 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_8 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_8 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_9 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_9 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| pkLen_10 | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| delay_10 | 2-byte field formatted as a int. There is no restriction on the value of this field. |
| stationId | 1-byte field formatted as a int. There is no restriction on the value of this field. |
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.dn_zeroize | ( | self | ) |
Zeroize (zeroise) command erases flash area that is used to store configuration parameters, such as join keys.
This command is intended to satisfy zeroization requirement of FIPS-140 standard. After the command executes, the mote should be reset. Available in mote >= 1.4.x
The zeroize command will render the mote inoperable. It must be re-programmed via SPI or JTAG in order to be useable.
| def SmartMeshSDK.IpMoteConnector.IpMoteConnector.IpMoteConnector.getNotification | ( | self, | |
timeoutSec = -1 |
|||
| ) |
Get a notification from the notification queue, and returns it properly formatted.
| NotificationError | if unknown notification. |
|
static |
ADVRECEIVED notification.
The advReceived notification is generated by the mote w hen it is in Promiscuous Listen state (see the Mote States table) and it receives an advertisement.
Formatted as a Tuple_advReceived named tuple. It contains the following fields:
netId
2-byte field formatted as a int.moteId
2-byte field formatted as a int.rssi
1-byte field formatted as a ints.joinPri
1-byte field formatted as a int.
|
static |
EVENTS notification.
The mote sends an events notification to inform the application of new events that occurred since the previous events notification. The notification also contains up-to-date information about current mote state and any pending alarms.
Formatted as a Tuple_events named tuple. It contains the following fields:
events
4-byte field formatted as a int.state
1-byte field formatted as a int.alarmsList
4-byte field formatted as a int.
|
static |
MACRX notification.
Formatted as a Tuple_macRx named tuple. It contains the following fields:
payload
None-byte field formatted as a hex.
|
static |
Dictionary of all notification tuples.
|
static |
RECEIVE notification.
Informs the application that a packet was received.
Formatted as a Tuple_receive named tuple. It contains the following fields:
socketId
1-byte field formatted as a int.srcAddr
16-byte field formatted as a hex.srcPort
2-byte field formatted as a int.payload
None-byte field formatted as a hex.
|
static |
TIMEINDICATION notification.
The timeIndication notification applies to mote products that support a time interrupt into the mote. The time packet includes the network time and the current UTC time relative to the manager.
For LTC5800-IPM based products, driving the TIMEn pin low (assert) wakes the processor. The pin must asserted for a minimum of t strobe s. De-asserting the pin latches the time, and a timeIndication will be generated within t response ms.Refer to the LTC5800-IPM Datasheet for additional information about TIME pin usage. The processor will remain awake and drawing current while the TIMEn pin is asserted. To avoid drawing excess current, take care to minimize the duration of the TIMEn pin being asserted past t strobe minimum.
Formatted as a Tuple_timeIndication named tuple. It contains the following fields:
uptime
4-byte field formatted as a int.utcSecs
8-byte field formatted as a int.utcUsecs
4-byte field formatted as a int.asn
5-byte field formatted as a hex.asnOffset
2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_bindSocket() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_clearNV() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_closeSocket() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_disconnect() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_antGain() function.
RC
: 1-byte field formatted as a int.antGain
: 1-byte field formatted as a ints.
|
static |
The named tuple returned by the dn_getParameter_appInfo() function.
RC
: 1-byte field formatted as a int.vendorId
: 2-byte field formatted as a int.appId
: 1-byte field formatted as a int.appVer
: 5-byte field formatted as a hex.
|
static |
The named tuple returned by the dn_getParameter_autoJoin() function.
RC
: 1-byte field formatted as a int.autoJoin
: 1-byte field formatted as a bool.
|
static |
The named tuple returned by the dn_getParameter_charge() function.
RC
: 1-byte field formatted as a int.qTotal
: 4-byte field formatted as a int.upTime
: 4-byte field formatted as a int.tempInt
: 1-byte field formatted as a ints.tempFrac
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_euCompliantMode() function.
RC
: 1-byte field formatted as a int.compMode
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_eventMask() function.
RC
: 1-byte field formatted as a int.eventMask
: 4-byte field formatted as a hex.
|
static |
The named tuple returned by the dn_getParameter_ipv6Address() function.
RC
: 1-byte field formatted as a int.ipv6Address
: 16-byte field formatted as a hex.
|
static |
The named tuple returned by the dn_getParameter_joinDutyCycle() function.
RC
: 1-byte field formatted as a int.joinDutyCycle
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_macAddress() function.
RC
: 1-byte field formatted as a int.macAddress
: 8-byte field formatted as a hex.
|
static |
The named tuple returned by the dn_getParameter_moteId() function.
RC
: 1-byte field formatted as a int.moteId
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_moteInfo() function.
RC
: 1-byte field formatted as a int.apiVersion
: 1-byte field formatted as a int.serialNumber
: 8-byte field formatted as a hex.hwModel
: 1-byte field formatted as a int.hwRev
: 1-byte field formatted as a int.swVerMajor
: 1-byte field formatted as a int.swVerMinor
: 1-byte field formatted as a int.swVerPatch
: 1-byte field formatted as a int.swVerBuild
: 2-byte field formatted as a int.bootSwVer
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_moteStatus() function.
RC
: 1-byte field formatted as a int.state
: 1-byte field formatted as a int.reserved_0
: 1-byte field formatted as a int.reserved_1
: 2-byte field formatted as a int.numParents
: 1-byte field formatted as a int.alarms
: 4-byte field formatted as a int.reserved_2
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_netInfo() function.
RC
: 1-byte field formatted as a int.macAddress
: 8-byte field formatted as a hex.moteId
: 2-byte field formatted as a int.networkId
: 2-byte field formatted as a int.slotSize
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_networkId() function.
RC
: 1-byte field formatted as a int.networkId
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_OTAPLockout() function.
RC
: 1-byte field formatted as a int.mode
: 1-byte field formatted as a bool.
|
static |
The named tuple returned by the dn_getParameter_powerSrcInfo() function.
RC
: 1-byte field formatted as a int.maxStCurrent
: 2-byte field formatted as a int.minLifetime
: 1-byte field formatted as a int.currentLimit_0
: 2-byte field formatted as a int.dischargePeriod_0
: 2-byte field formatted as a int.rechargePeriod_0
: 2-byte field formatted as a int.currentLimit_1
: 2-byte field formatted as a int.dischargePeriod_1
: 2-byte field formatted as a int.rechargePeriod_1
: 2-byte field formatted as a int.currentLimit_2
: 2-byte field formatted as a int.dischargePeriod_2
: 2-byte field formatted as a int.rechargePeriod_2
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_routingMode() function.
RC
: 1-byte field formatted as a int.routingMode
: 1-byte field formatted as a bool.
|
static |
The named tuple returned by the dn_getParameter_testRadioRxStats() function.
RC
: 1-byte field formatted as a int.rxOk
: 2-byte field formatted as a int.rxFailed
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_time() function.
RC
: 1-byte field formatted as a int.upTime
: 4-byte field formatted as a int.utcSecs
: 8-byte field formatted as a int.utcUsecs
: 4-byte field formatted as a int.asn
: 5-byte field formatted as a hex.asnOffset
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_getParameter_txPower() function.
RC
: 1-byte field formatted as a int.txPower
: 1-byte field formatted as a ints.
|
static |
The named tuple returned by the dn_getServiceInfo() function.
RC
: 1-byte field formatted as a int.destAddr
: 2-byte field formatted as a hex.type
: 1-byte field formatted as a int.state
: 1-byte field formatted as a int.value
: 4-byte field formatted as a int.
|
static |
The named tuple returned by the dn_join() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_lowPowerSleep() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_openSocket() function.
RC
: 1-byte field formatted as a int.socketId
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_requestService() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_reset() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_search() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_sendTo() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_advKey() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_antGain() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_autoJoin() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_euCompliantMode() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_eventMask() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_joinDutyCycle() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_joinKey() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_macAddress() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_networkId() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_OTAPLockout() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_powerSrcInfo() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_routingMode() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_setParameter_txPower() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_socketInfo() function.
RC
: 1-byte field formatted as a int.index
: 1-byte field formatted as a int.socketId
: 1-byte field formatted as a int.protocol
: 1-byte field formatted as a int.bindState
: 1-byte field formatted as a int.port
: 2-byte field formatted as a int.
|
static |
The named tuple returned by the dn_testRadioRx() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_testRadioTxExt() function.
RC
: 1-byte field formatted as a int.
|
static |
The named tuple returned by the dn_zeroize() function.
RC
: 1-byte field formatted as a int.
|
static |
TXDONE notification.
The txDone notification informs the application that the mote has finished sending a packet. This notification will only be generated if the user has provided a valid (0x0000-0xFFFE) packetID when calling the sendTo command.
Formatted as a Tuple_txDone named tuple. It contains the following fields:
packetId
2-byte field formatted as a int.status
1-byte field formatted as a int.


 They have a white stripe on the side of their face which goes onto their chest and fades into a tan. They have grey backs which carries onto their wings. Their wings are a mix of white, grey, and black. Black-capped chickadees have black eyes and small beaks.
Unlike most birds, Black-capped Chickadees will keep the same mates for the rest of their life. This makes sense due to their short lifespan.
Like squirrels and chipmunks, Black-capped Chickadees will hide nuts, each in a different place. They can remember up to 100 different hiding places.


SideWaffle is an extension
This is where all the item- and project templates live.
Templates for Visual Studio 2012/2013
This is where all the item- and project templates live.
SideWaffle is open source and everyone is invited to contribute. The code is on GitHub.
The entire project is 100% community driven.


About Us
A true guiding light is what shows up the path towards a better future of a child. The NSS Adhyayan works on the same lines with a motive to teach the young students of Amhara and make them aware about the various career opportunities they have. At
adhyayan we teach the underprivileged children basics of computer that are required in everyday life.Practicals of computer are given to students, so that they can apply what they have learned.Learning computer gives them practical
knowlege and a lot more.
They are also taught how to communicate in English which in today's scenario is an important tool to develop and explore yourself.
Exams are conducted regulary to check how much the
students have learn. In addition to this parent teacher meetings are conducted on session basis which helps the parents analyse their child's performance.This in helps them for a depth knowlege of education and its importance which
is a must for the future development.
Our Motive
We give Navodaya Coaching to the students of the village.We want them to become educated enough to read, write and speak with full confidence in their eyes.
Regular exams are conducted to check the proficiency of the students. They put a check on their daily performance which is nourished by their results.
Parents teacher interaction are held to inform the parents about the progress of the students. It is neccessary to boost their entusiasm adn gives them confidence.
Study Hours
The Adhyayan Unit volunteers conduct classes in Amhara high school , Amhara, for 4 days in a week. All the subjects included in JNVST are covered during the classes in a systematic manner. Tests based on all the subjects taught in the class are conducted once in a week. These tests are checked by the team volunteers and accordingly marks are given to the students. This helps the students to keep up with topics covered in the class and also study them regularly.The children are taught according to a prescribed syllabus. The Adhyayan Unit is aiming to increase the range of the exams for which they are preparing the children. This will include covering more subjects and efforts for the all-round development of the children.


| I l@ve RuBoard |
Change and decay in all around I see …
H. F. Lyte, "Abide With Me"
As a program evolves, it will become necessary to rethink earlier decisions and rework portions of the code. This process is perfectly natural. Code needs to evolve; it's not a static thing.
Unfortunately, the most common metaphor for software development is building construction (Bertrand Meyer [Mey97b] uses the term "Software Construction"). But using construction as the guiding metaphor implies these steps:
An architect draws up blueprints.
Contractors dig the foundation, build the superstructure, wire and plumb, and apply finishing touches.
The tenants move in and live happily ever after, calling building maintenance to fix any problems.
Well, software doesn't quite work that way. Rather than construction, software is more like gardening—it is more organic than concrete. You plant many things in a garden according to an initial plan and conditions. Some thrive, others are destined to end up as compost. You may move plantings relative to each other to take advantage of the interplay of light and shadow, wind and rain. Overgrown plants get split or pruned, and colors that clash may get moved to more aesthetically pleasing locations. You pull weeds, and you fertilize plantings that are in need of some extra help. You constantly monitor the health of the garden, and make adjustments (to the soil, the plants, the layout) as needed.
Business people are comfortable with the metaphor of building construction: it is more scientific than gardening, it's repeatable, there's a rigid reporting hierarchy for management, and so on. But we're not building skyscrapers—we aren't as constrained by the boundaries of physics and the real world.
The gardening metaphor is much closer to the realities of software development. Perhaps a certain routine has grown too large, or is trying to accomplish too much—it needs to be split into two. Things that don't work out as planned need to be weeded or pruned.
Rewriting, reworking, and re-architecting code is collectively known as refactoring.
When you come across a stumbling block because the code doesn't quite fit anymore, or you notice two things that should really be merged, or anything else at all strikes you as being "wrong," don't hesitate to change it There's no time like the present. Any number of things may cause code to qualify for refactoring:
Duplication. You've discovered a violation of the DRY principle (The Evils of Duplication).
Nonorthogonal design. You've discovered some code or design that could be made more orthogonal (Orthogonality).
Outdated knowledge. Things change, requirements drift, and your knowledge of the problem increases. Code needs to keep up.
Performance. You need to move functionality from one area of the system to another to improve performance.
Refactoring your code—moving functionality around and updating earlier decisions—is really an exercise in pain management. Let's face it, changing source code around can be pretty painful: it was almost working, and now it's really torn up. Many developers are reluctant to start ripping up code just because it isn't quite right.
So you go to your boss or client and say, "This code works, but I need another week to refactor it."
We can't print their reply.
Time pressure is often used as an excuse for not refactoring. But this excuse just doesn't hold up: fail to refactor now, and there'll be a far greater time investment to fix the problem down the road—when there are more dependencies to reckon with. Will there be more time available then? Not in our experience.
You might want to explain this principle to the boss by using a medical analogy: think of the code that needs refactoring as a "growth." Removing it requires invasive surgery. You can go in now, and take it out while it is still small. Or, you could wait while it grows and spreads—but removing it then will be both more expensive and more dangerous. Wait even longer, and you may lose the patient entirely.
Tip 47
Refactor Early, Refactor Often
Keep track of the things that need to be refactored. If you can't refactor something immediately, make sure that it gets placed on the schedule. Make sure that users of the affected code know that it is scheduled to be refactored and how this might affect them.
Refactoring started out in the Smalltalk community, and, along with other trends (such as design patterns), has started to gain a wider audience. But as a topic it is still fairly new; there isn't much published on it. The first major book on refactoring ([FBB+99], and also [URL 47]) is being published around the same time as this book.
At its heart, refactoring is redesign. Anything that you or others on your team designed can be redesigned in light of new facts, deeper understandings, changing requirements, and so on. But if you proceed to rip up vast quantities of code with wild abandon, you may find yourself in a worse position than when you started.
Clearly, refactoring is an activity that needs to be undertaken slowly, deliberately, and carefully. Martin Fowler offers the following simple tips on how to refactor without doing more harm than good (see the box on in [FS97]):
Don't try to refactor and add functionality at the same time.
Make sure you have good tests before you begin refactoring. Run the tests as often as possible. That way you will know quickly if your changes have broken anything.
Automatic RefactoringHistorically, Smalltalk users have always enjoyed a class browser as part of the IDE. Not to be confused with Web browsers, class browsers let users navigate through and examine class hierarchies and methods. Typically, class browsers allow you to edit code, create new methods and classes, and so on. The next variation on this idea is the refactoring browser. A refactoring browser can semiautomatically perform common refactoring operations for you: splitting up a long routine into smaller ones, automatically propagating changes to method and variable names, drag and drop to assist you in moving code, and so on. As we write this book, this technology has yet to appear outside of the Smalltalk world, but this is likely to change at the same speed that Java changes—rapidly. In the meantime, the pioneering Small-talk refactoring browser can be found online at [URL 20]. |
Take short, deliberate steps: move a field from one class to another, fuse two similar methods into a superclass. Refactoring often involves making many localized changes that result in a larger-scale change. If you keep your steps small, and test after each step, you will avoid prolonged debugging.
We'll talk more about testing at this level in Code That's Easy to Test, and larger-scale testing in Ruthless Testing, but Mr. Fowler's point of maintaining good regression tests is the key to refactoring with confidence.
It can also be helpful to make sure that drastic changes to a module—such as altering its interface or its functionality in an incompatible manner—break the build. That is, old clients of this code should fall to compile. You can then quickly find the old clients and make the necessary changes to bring them up to date.
So next time you see a piece of code that isn't quite as it should be, fix both it and everything that depends on it. Manage the pain: if it hurts now, but is going to hurt even more later, you might as well get it over with. Remember the lessons of Software Entropy, don't live with broken windows.
| I l@ve RuBoard |


{% extends "translator/base.html" %} {% block body %}
The App Composer Translator stores in a local database all the translations and suggestions. This includes translations of applications, suggestions from other translations or from cloud services, historic of who wrote what, etc. However, so as to avoid Shindig contacting the App Composer (located in other university) for each translation of each application, we also have a MongoDB database outside the App Composer institution. The App Composer is responsible of pushing the translations to this MongoDB database. Ideally, the MongoDB would be located in the same institution as Shindig (so as to avoid calls to a Cloud service only for the translation), but at this moment it's located in an cloud basis at mongolabs.com.
Therefore, in this page you will find both what is stored in the App Comoposer database and also what is stored in the MongoDB database.
This is what is used by Shindig.


Supporters cheer Brazil's former president Lula as he is freed from jail – video
Brazil’s former president Luiz Inácio Lula da Silva was greeted by overjoyed supporters as he was released from prison, where he was serving a 12-year corruption sentence, after a supreme court ruling.
Lula was greeted on Friday by supporters wearing T-shirts emblazoned with his face and waving red flags outside the federal police HQ in the city of Curitiba, where he had been imprisoned for 580 days.


For this week's blog I chose a topic that I considered very useful and powerful: regular expression.
Have you ever needed to look for a specific word in a long text and replace it for something else? Have you ever wanted to find all the words that match a specific pattern? I'm pretty sure the answer is yes and the good news is: regular expressions can help you with that.
Regular expression, or regex for short, is used to search texts that match a specific pattern. The pattern is described by the expression, which is nothing more than a group of characters or wildcards. It takes time to get used to regular expressions, since it is not easy to identify what the patterns are describing, but the good thing is that there is plenty of documentation in the web about regex.
Many programming languages support regex, but they can have slight differences in the implementation, so when using regex be aware of that and make sure you are using the correct syntax.
Before we start playing with some examples, let's talk about some basic definitions.
The expressions are formed by literal and metacharacters. Literal characters are all the characters that do not have a special meaning, so they are literally the characters that we want to find. Examples of literal characters are: A, 1, ! Metacharacters have special meaning, so they cannot be used as literal in the the search expression. Examples of metacharacters are: ^, \, $, * The metacharaters can be identified as literal using what we call escape. The metacharacter \ is used to escape other metacharacters. So, if you want to look for $20 in a text, the expression would look like this: \$20. Note that the \ metacharacter is placed before the $. In this way, the $ will be interpreted as a literal character.
The metacharacters can have different meanings depending on how they are combined and/or positioned in the expression, so it is difficult to make a list explaining what each one does. I prefer to give some examples to try to clarify the syntax, so let's start.
2.0.0-p451 :117 > "Testing REGEX!!!".match(/(Test)/)
=> # MatchData "Test" 1:"Test"
This is a ruby example. It is using the method match with a regular expression. As you can see, the result of the command was "Test", since the expression was only looking for the Test text in the string "Testing REGEX!!!". What if we want to filter only the capital letters after the space, in this case, the REGEX text.
2.0.0-p451 :121 > "Testing REGEX!!!".match(/\s([A-Z]*)/)
=> #MatchData " REGEX" 1:"REGEX">
The command above is using the shorthand character \s to matches a whitespace. After the \s there is the metacharacter [ ], which is used to matches a letter from A to Z. The [ ] matches only one occurrence, so if we don't use the * metacharacter, the result will be "R". See bellow:
2.0.0-p451 :127 > "Testing REGEX!!!".match(/\s([A-Z])/)
=> #MatchData " R" 1:"R">
We could also use the metacharacter ^ inside the brackets to negates the expression, so if we only want the capital letters, the expression would be [^a-z]. Check it out:
2.0.0-p451 :128 > "Testing REGEX!!!".match(/\s([^a-z]*)/)
=> #MatchData " REGEX!!!" 1:"REGEX!!!">
The result is almost the same, the difference is that here it includes the !!!, since the metacharacter is matching everything except by the a-z range.
As mentioned above, the metacharacters can have different meanings depending on their position in the expression. The ^ is a good example. Take a look at the following example.
2.0.0-p451 :147 > "Testing REGEX!!!".match(/(^T\w*)/)
=> #MatchData "Testing" 1:"Testing">
Here the ^T is matching everything that starts with T, so the meaning of the ^ metacharacter outside the brackets is different. The /w is a shorthand that matches any character in the range 0 - 9, A - Z and a - z. The result is Testing, since we are matching the first letter equal to T and all the characters in the range 0 - 9, A - Z and a - z. As there is a space in the middle, the rest of the text is not part of the result.
In the case we wanted to match the whole sentence, we could use:
2.0.0-p451 :149 > "Testing REGEX!!!".match(/(^T\w*)\s([^a-z]*)/)
=> #MatchData "Testing REGEX!!!" 1:"Testing" 2:"REGEX!!!">
or
2.0.0-p451 :154 > "Testing REGEX!!!".match(/(\w*)\s(\w*!!!)/)
=> #MatchData "Testing REGEX!!!" 1:"Testing" 2:"REGEX!!!">
In the second example I included the ! character since the \w does not match this kind of character. There are plenty of ways to do that, here are some of them:
2.0.0-p451 :160 >"Testing REGEX!!!".match(/(\w*)\s(\w*)(!{3})/)
=> #MatchData "Testing REGEX!!!" 1:"Testing" 2:"REGEX" 3:"!!!">
In this case the {3} is specifying that the ! should appear exactly 3 times to be matched. If we change the number to 4 it will not match.
2.0.0-p451 :169 > "Testing REGEX!!!".match(/(\w*)\s(\w*)(!+)/)
=> #MatchData "Testing REGEX!!!" 1:"Testing" 2:"REGEX" 3:"!!!">
The metacharacter +(plus) matches when the preceding character occurs 1 or more times, as the ! occurs 3 times, it will match.
Now, let's see a more useful example. Imagine that you have a list of contacts, but you want to select only the telephone number. If all the phone numbers have the same pattern, we can use a regular expression to filter them. Here is how we can do that:
2.0.0-p451 :201 > "John Lake<PHONE_NUMBER>".match(/\(\d{3}\) \d{3}-\d{4}/)
=> #MatchData "(555) 123-4567">
The string of the example has a name and a number. The expression is looking only for the number. We start from the ( character. As it is a special character and we want it to be interpreted as literal character, we use the back slash \ to escape it. After that, the \d shorthand is used to match the digits and the {3} is fixing the number of digits to 3. The next step is to use the \ again to scape the closing ). The \d{3} is mattching the next 3 digits after the space and the last part is matching the last 4 digits after the -. The result returned the number since it is exactly in this format. If the number was not in this format, the command would return nil.
Regex is very powerful and useful to parse any text data. This post covered some basic and simple regular expressions, but there is much more to explore.


Model library¶
Elements¶
Exciting documentation in here. Let’s make a list (empty surrounding lines required):
Why
Parameters
Process conditions
Configuration
Mode of operation
Oxygen conditions
Temperature
pH
Product
Limiting substrate
Processes involved
Type of microorganisms
Filamentous growth
Type of model
Literature reference


About the guiding principles of Bootstrap 4 (summary).
Bootstrap 3's Glyphicons is now dropped. Bootstrap 4 recommends using external icon libraries.
See More options for further libraries.
Changes (v4.0) from previous versions.
Changes from v4.0 Beta to stable v4.0
Changes from version 3 to version 4 (summary)
em
to rem
14px
to 16px
, etc.Changes by component (summary / top items only, see source links for further details)
.page-header
(use utilities instead), .dl-horizontal
(use .row
).img-responsive
to .img-fluid
.img-rounded
to .rounded
.img-circle
to .rounded-circle
>
) to simplify customizations especially for nested tables.table-condensed
to .table-sm
.control-label
to .col-form-label
.input-(lg|sm)
to .form-control-(lg|sm)
.form-group-*
(use .form-control-*
).btn-default
to .btn-secondary
.btn-xs
button.js
.btn-group-justified
.btn-group-xs
div
and ul
elements576px
breakpoint as sm
(now xs
, sm
, mb
, lg
, and xl
).col-{breakpoint}-{modifier}-{size}
to .{modifier}-{breakpoint}-{size}
a.list-group-item
with .list-group-item-action
remote
optionloaded.bs.modal
event>
) for simpler styling.navbar
by .navbar-expand-{breakpoint}
.page-(item|link)
are now required on the descendants of .pagination
elements.breadcrumb-item
is now required on breadcrumb items.progress-bar-*
with .bg-*
.active
for animated progress bars with .progress-bar-animated
.carousel-
prefix).d-(sm|md|lg|xl)-(none|inline|...)
.text-(sm|md|lg|xl)-(left|center|right)
Others
About Bootstrap development team, history, etc.
Documentation and examples for Bootstrap’s logo and brand usage guidelines.
FAQ's about Bootstrap’s open source license.
Links to translations of Bootstrap doocumentation.


UIView(CLUViewRecordableAdditions)
@interface UIView (CLUViewRecordableAdditions)
UIView (CLUViewRecordableAdditions)
category contains metho to parse UIView
properties and encode them into json like dictionary
To be able to include UIView
properties into Clue report
-
Generate color dictionary which includes red, green, blue and alpha value of specific color
@code {
red
:, green
:, blue
:, alpha
:} Declaration
Objective-C
- (NSDictionary *)clue_colorPropertyDictionaryForColor:(UIColor *)color;
Swift
func clue_colorPropertyDictionary(for color: UIColor!) -> [AnyHashable : Any]!
Parameters
color
Result color dictionary will be based on this
UIColor
objectReturn Value
Color dictionary with data from selected
UIColor
object -
Generate size dictionary which includes width and height of specific size
@code {
width
:, height
:} Declaration
Objective-C
- (NSDictionary *)clue_sizePropertyDictionaryForSize:(CGSize)size;
Swift
func clue_sizePropertyDictionary(for size: CGSize) -> [AnyHashable : Any]!
Parameters
size
Result size dictionary will be based on this
CGSize
valueReturn Value
Size dictionary with data from selected
CGSize
value -
Generate font dictionary which includes familyName, fontName, pointSize and lineHeight of specific font
@code {
familyName
:, fontName
:, pointSize
:, lineHeight
:} Declaration
Objective-C
- (NSDictionary *)clue_fontPropertyDictionaryForFont:(UIFont *)font;
Swift
func clue_fontPropertyDictionary(for font: UIFont!) -> [AnyHashable : Any]!
Parameters
font
Result font dictionary will be based on this
UIFont
objectReturn Value
Font dictionary with data from selected
UIFont
object -
Generate attributed string dictionary which includes string object of specific attributed string
@code {
string
:} Declaration
Objective-C
- (NSDictionary *)clue_attributedTextPropertyDictionaryForAttributedString: (NSAttributedString *)attributedText;
Swift
func clue_attributedTextPropertyDictionary(for attributedText: NSAttributedString!) -> [AnyHashable : Any]!
Parameters
attributedText
Result attributed string dictionary will be based on this
NSAttributedString
objectReturn Value
Attributed String dictionary with data from selected
NSAttributedString
object -
Generate layout margin dictionary which includes left, top, right and bottom margins for current
UIView
objectWarning
This method doesn’t have any input, it generates dictionary based on current
UIView
object@code {
left
:, top
:, right
:, bottom
:} Declaration
Objective-C
- (NSDictionary *)clue_layoutMarginsPropertyDictionary;
Swift
func clue_layoutMarginsPropertyDictionary() -> [AnyHashable : Any]!
Return Value
Layout Margin dictionary with data from current
UIView
object -
Generate frame dictionary which includes x, y, width and height for current
UIView
objectWarning
This method doesn’t have any input, it generates dictionary based on current
UIView
object@code {
x
:, y
:, width
:, height
:} Declaration
Objective-C
- (NSDictionary *)clue_frameProprtyDictionary;
Swift
func clue_frameProprtyDictionary() -> [AnyHashable : Any]!
Return Value
Frame dictionary with data from current
UIView
object