Skip to content

Commit 667006e

Browse files
Seppo TakaloHasnain Virk
authored andcommitted
Nanostack 6.0.1
1 parent e4f91cd commit 667006e

File tree

94 files changed

+721
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+721
-172
lines changed

features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/docs/11_API_sockets.md

Lines changed: 58 additions & 29 deletions

features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/docs/16_API_porting.md

Lines changed: 3 additions & 1 deletion
Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,66 @@
11
@startuml
22

3-
class NanostackRfPhy {
4-
+int8_t rf_register()
5-
+int8_t rf_register()
6-
+void get_mac_address(uint8_t *mac)
7-
+void set_mac_address(uint8_t *mac)
3+
package "mbed OS Socket abstraction" {
4+
abstract class MeshInterface -|> NetworkInterface
5+
6+
interface NetworkInterface {
7+
+connect();
8+
+disconnect();
9+
+NetworkStack *get_stack();
10+
}
11+
12+
interface NetworkStack
813
}
914

10-
class MeshInterfaceNanostack {
15+
package "Nanostack PHY driver interface" {
16+
interface NanostackPhy {
17+
+int8_t phy_register()
18+
+void get_mac_address(uint8_t *mac)
19+
+void set_mac_address(uint8_t *mac)
20+
}
21+
NanostackPhy <|-- abstract class NanostackRfPhy
22+
NanostackPhy <|-- abstract class NanostackEthernetPhy
23+
}
24+
25+
package "mesh API internals" {
26+
class NanostackInterface {
27+
{static} +NanostackInterface *get_stack()
28+
#socket_open()
29+
#socket_close()
30+
#socket_bind()
31+
#socket_listen()
32+
#socket_connect()
33+
#socket_accept()
34+
#socket_send()
35+
#socket_recv()
36+
#socket_sendto()
37+
#socket_recvfrom()
38+
#socket_attach()
39+
#setsockopt()
40+
#getsockopt()
41+
}
42+
NetworkStack <|-- NanostackInterface
43+
44+
abstract class MeshInterfaceNanostack {
45+
+initialize(NanostackPhy *phy)
46+
+connect()
47+
+disconnect()
48+
#NetworkStack *get_stack(void)
49+
}
50+
MeshInterface <|-- MeshInterfaceNanostack
51+
NanostackPhy --o MeshInterfaceNanostack
52+
MeshInterfaceNanostack -left-> NanostackInterface : get_stack()
1153
}
12-
MeshInterfaceNanostack o-- NanostackRfPhy
13-
MeshInterfaceNanostack o-- AbstractMesh
14-
MeshInterfaceNanostack o-- NanostackInterface
1554

16-
class MeshInterface {
55+
package "mbed-mesh-api" {
56+
MeshInterfaceNanostack <|-- LoWPANNDInterface
57+
MeshInterfaceNanostack <|-- ThreadInterface
58+
MeshInterfaceNanostack <|-- NanostackEthernetInterface
1759
}
18-
NanostackInterface --|> NetworkStack
19-
MeshInterfaceNanostack --|> MeshInterface
20-
MeshInterface --|> NetworkInterface
2160

22-
LoWPANNDInterface --|> MeshInterfaceNanostack
23-
ThreadInterface --|> MeshInterfaceNanostack
2461

25-
AbstractMesh --|> AbstractNetworkInterface
26-
class AbstractNetworkInterface
62+
hide empty members
63+
hide empty attributes
64+
hide empty fields
2765

28-
@enduml
66+
@enduml
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@startuml
2+
3+
package "mbed OS Socket abstraction" {
4+
interface NetworkStack
5+
NetworkStack -o Socket
6+
abstract class Socket
7+
Socket <|-- UDPSocket
8+
Socket <|-- TCPSocket
9+
Socket <|-- TCPServer
10+
}
11+
12+
interface NetworkInterface
13+
NetworkInterface --> NetworkStack : get_stack()
14+
EthernetInterface --|> NetworkInterface
15+
CellularInterface --|> NetworkInterface
16+
17+
package "mbed-mesh-api" {
18+
abstract class MeshInterfaceNanostack <|-- LoWPANNDInterface
19+
MeshInterfaceNanostack <|-- ThreadInterface
20+
MeshInterfaceNanostack --|> NetworkInterface
21+
}
22+
23+
24+
hide empty members
25+
hide empty attributes
26+
hide empty fields
27+
28+
@enduml

features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/docs/thread_APIs.md

Lines changed: 27 additions & 4 deletions

features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/nanostack/ethernet_mac_api.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ extern int8_t ethernet_mac_destroy(eth_mac_api_t *mac_api);
7979
* @param api API to handle the request
8080
* @param data Data containing request parameters
8181
*/
82-
typedef void data_request(const eth_mac_api_t* api, const eth_data_req_t *data);
82+
typedef void eth_mac_data_request(const eth_mac_api_t* api, const eth_data_req_t *data);
8383

8484
/**
8585
* @brief data_confirm confirm is called as a response to data_request
8686
* @param api The API which handled the request
8787
* @param data Data containing confirm parameters
8888
*/
89-
typedef void data_confirm(const eth_mac_api_t* api, const eth_data_conf_t *data );
89+
typedef void eth_mac_data_confirm(const eth_mac_api_t* api, const eth_data_conf_t *data );
9090

9191
/**
9292
* @brief data_indication Data indication is called when MAC layer has received data
9393
* @param api The API which handled the response
9494
* @param data Data containing indication parameters
9595
*/
96-
typedef void data_indication(const eth_mac_api_t* api, const eth_data_ind_t *data );
96+
typedef void eth_mac_data_indication(const eth_mac_api_t* api, const eth_data_ind_t *data );
9797

9898
/**
9999
* @brief Set 48 bit address from MAC
@@ -119,15 +119,15 @@ typedef int8_t eth_mac_mac48_address_get(const eth_mac_api_t* api, uint8_t *mac4
119119
* @param parent_id Upper layer identifier
120120
* @return 0 if success; -1 if api is NULL or not found
121121
*/
122-
typedef int8_t eth_mac_api_initialize(eth_mac_api_t *api, data_confirm *conf_cb,
123-
data_indication *ind_cb, uint8_t parent_id);
122+
typedef int8_t eth_mac_api_initialize(eth_mac_api_t *api, eth_mac_data_confirm *conf_cb,
123+
eth_mac_data_indication *ind_cb, uint8_t parent_id);
124124

125125
struct eth_mac_api_s {
126126
eth_mac_api_initialize *mac_initialize;
127127

128-
data_request *data_req;
129-
data_confirm *data_conf_cb;
130-
data_indication *data_ind_cb;
128+
eth_mac_data_request *data_req;
129+
eth_mac_data_confirm *data_conf_cb;
130+
eth_mac_data_indication *data_ind_cb;
131131

132132
eth_mac_mac48_address_set *mac48_set;
133133
eth_mac_mac48_address_get *mac48_get;
@@ -141,3 +141,4 @@ struct eth_mac_api_s {
141141
#endif
142142

143143
#endif // ETHERNET_MAC_API_H
144+

features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/nanostack/mlme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ typedef enum {
249249
macAutoRequestKeyIndex = 0x7b, /*>The index of the key used for automatic data*/
250250
macDefaultKeySource = 0x7c, /*>Default key source*/
251251
//NON standard extension
252-
macLoadBalancingBeaconTxPeriod = 0xfd, /*> Set Beacon periodic Tx interval.Value size uint16_t in seconds, Use 0 to disable */
252+
macLoadBalancingBeaconTx = 0xfd, /*> Trig Beacon from load balance module periodic */
253253
macLoadBalancingAcceptAnyBeacon = 0xfe, /*>Beacon accept state control from other network. Value size bool, data true=Enable, false=disable .*/
254254
macThreadForceLongAddressForBeacon = 0xff /*>Thread standard force beacon source address for extended 64-bit*/
255255
} mlme_attr_t;

0 commit comments

Comments
 (0)