Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4781c40

Browse files
authored
SocketWrapper: add macAddress() getter (#749)
1 parentd9fc415 commit4781c40

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎libraries/SocketWrapper/src/SocketHelpers.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ uint8_t* arduino::MbedSocketClass::macAddress(uint8_t* mac) {
1111
return mac;
1212
}
1313

14+
Stringarduino::MbedSocketClass::macAddress() {
15+
returnString(getNetwork()->get_mac_address());
16+
}
17+
1418
intarduino::MbedSocketClass::hostByName(constchar* aHostname, IPAddress& aResult) {
1519
SocketAddress socketAddress =SocketAddress();
1620
nsapi_error_t returnCode =getNetwork()->gethostbyname(aHostname, &socketAddress);

‎libraries/SocketWrapper/src/SocketHelpers.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class MbedSocketClass {
113113
inthostByName(constchar* aHostname, IPAddress& aResult);
114114

115115
uint8_t*macAddress(uint8_t* mac);
116+
StringmacAddress();
116117

117118
voidsetFeedWatchdogFunc(voidFuncPtr func);
118119
voidfeedWatchdog();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp