Skip to content

Commit ac8c011

Browse files
committed
sm_clib 1.0.1.3
1 parent 037b356 commit ac8c011

File tree

17 files changed

+1786
-1340
lines changed

17 files changed

+1786
-1340
lines changed

examples/arduino/Libraries/IpMgWrapper/IpMgWrapper.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
/*
22
Copyright (c) 2014, Dust Networks. All rights reserved.
33
4-
Arduino library to connect to a SmartMesh IP mote and periodically send data.
4+
Arduino library to connect to a SmartMesh IP manager.
55
66
This library is an Arduino "wrapper" around the generic SmartMesh C library.
77
88
This library will:
9-
- Connect to the SmartMesh IP mote over its serial port.
10-
- Have the SmartMesh IP mote connect to a SmartMesh IP network, open and bind a
11-
UDP socket
12-
- Periodically, invoke a data generation function and send the generated
13-
payload to the specified IPv6 address and UDP port.
9+
- Connect to the SmartMesh IP manager.
10+
- Subscribe to data notifications.
11+
- Get the MAC address of all nodes in the network.
12+
- Send an OAP command to blink each node's LED in a round-robin fashion.
1413
1514
\license See attached DN_LICENSE.txt.
1615
*/

examples/arduino/Libraries/IpMgWrapper/IpMgWrapper.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
/*
22
Copyright (c) 2014, Dust Networks. All rights reserved.
33
4-
Arduino library to connect to a SmartMesh IP mote and periodically send data.
4+
Arduino library to connect to a SmartMesh IP manager.
55
66
This library is an Arduino "wrapper" around the generic SmartMesh C library.
77
88
This library will:
9-
- Connect to the SmartMesh IP mote over its serial port.
10-
- Have the SmartMesh IP mote connect to a SmartMesh IP network, open and bind a
11-
UDP socket
12-
- Periodically, invoke a data generation function and send the generated
13-
payload to the specified IPv6 address and UDP port.
9+
- Connect to the SmartMesh IP manager.
10+
- Subscribe to data notifications.
11+
- Get the MAC address of all nodes in the network.
12+
- Send an OAP command to blink each node's LED in a round-robin fashion.
1413
1514
\license See attached DN_LICENSE.txt.
1615
*/

sm_clib/dn_clib_build.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*
2-
* DO NOT EDIT! Automatically generated by SCons.
3-
*/
4-
5-
enum {
6-
// This is the build number used on the next release.
7-
VER_BUILD = 2
8-
};
1+
/*
2+
* DO NOT EDIT! Automatically generated by SCons.
3+
*/
4+
5+
enum {
6+
// This is the build number used on the next release.
7+
VER_BUILD = 3
8+
};

sm_clib/dn_clib_version.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#ifndef DN_CLIB_VERSION_H
2-
#define DN_CLIB_VERSION_H
3-
4-
#include "dn_clib_build.h"
5-
6-
enum {
7-
VER_MAJOR = 1,
8-
VER_MINOR = 0,
9-
VER_PATCH = 0,
10-
};
11-
1+
#ifndef DN_CLIB_VERSION_H
2+
#define DN_CLIB_VERSION_H
3+
4+
#include "dn_clib_build.h"
5+
6+
enum {
7+
VER_MAJOR = 1,
8+
VER_MINOR = 0,
9+
VER_PATCH = 1,
10+
};
11+
1212
#endif

sm_clib/dn_common.h

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
/*
2-
Copyright (c) 2014, Dust Networks. All rights reserved.
3-
4-
Commmon definitions.
5-
6-
\license See attached DN_LICENSE.txt.
7-
*/
8-
9-
#ifndef DN_COMMON_H
10-
#define DN_COMMON_H
11-
12-
#include "inttypes.h"
13-
#include <stdbool.h>
14-
#include <string.h>
15-
16-
//=========================== defines =========================================
17-
18-
#ifndef TRUE
19-
#define TRUE 1
20-
#endif
21-
22-
#ifndef FALSE
23-
#define FALSE 0
24-
#endif
25-
26-
// error codes
27-
typedef enum {
28-
DN_ERR_NONE = 0,
29-
DN_ERR_BUSY,
30-
DN_ERR_NOT_CONNECTED, // only used in SmartMesh IP Manager
31-
DN_ERR_ALREADY,
32-
DN_ERR_MALFORMED
33-
} dn_err_t;
34-
35-
//=== API return type
36-
37-
//=========================== typedef =========================================
38-
39-
#endif
1+
/*
2+
Copyright (c) 2014, Dust Networks. All rights reserved.
3+
4+
Commmon definitions.
5+
6+
\license See attached DN_LICENSE.txt.
7+
*/
8+
9+
#ifndef DN_COMMON_H
10+
#define DN_COMMON_H
11+
12+
#include "inttypes.h"
13+
#include <stdbool.h>
14+
#include <string.h>
15+
16+
//=========================== defines =========================================
17+
18+
#ifndef TRUE
19+
#define TRUE 1
20+
#endif
21+
22+
#ifndef FALSE
23+
#define FALSE 0
24+
#endif
25+
26+
// error codes
27+
typedef enum {
28+
DN_ERR_NONE = 0,
29+
DN_ERR_BUSY,
30+
DN_ERR_NOT_CONNECTED, // only used in SmartMesh IP Manager
31+
DN_ERR_ALREADY,
32+
DN_ERR_MALFORMED
33+
} dn_err_t;
34+
35+
//=== API return type
36+
37+
//=========================== typedef =========================================
38+
39+
#endif

sm_clib/dn_endianness.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ Copyright (c) 2014, Dust Networks. All rights reserved.
2323

2424
void dn_write_uint16_t(uint8_t* ptr, uint16_t val);
2525
void dn_write_uint32_t(uint8_t* ptr, uint32_t val);
26+
void dn_write_int32_t(uint8_t* ptr, int32_t val);
2627
void dn_read_uint16_t(uint16_t* to, uint8_t* from);
2728
void dn_read_uint32_t(uint32_t* to, uint8_t* from);
29+
void dn_read_int32_t(int32_t* to, uint8_t* from);
2830

2931
#ifdef __cplusplus
3032
}

0 commit comments

Comments
 (0)