Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-rpc by
Diff: Arguments.cpp
- Revision:
- 1:afe5fe95394f
- Parent:
- 0:efe8172b4113
--- a/Arguments.cpp Tue Nov 20 17:23:59 2012 +0000
+++ b/Arguments.cpp Tue Feb 12 19:54:33 2013 +0000
@@ -84,6 +84,13 @@
return strtol(argv[index], &pEnd, 10);
}
+
+template<> unsigned int Arguments::getArg<unsigned int>(void) {
+ index++;
+ char *pEnd;
+ return strtoul(argv[index], &pEnd, 10);
+}
+
template<> const char* Arguments::getArg<const char*>(void) {
index++;
return argv[index];
@@ -138,6 +145,11 @@
reply += sprintf(reply, "%d", v);
}
+template<> void Reply::putData<unsigned int>(unsigned int v) {
+ separator();
+ reply += sprintf(reply, "%u", v);
+}
+
template<> void Reply::putData<float>(float f) {
separator();
reply += sprintf(reply, "%.17g", f);
