Compare commits
	
		
			4 Commits
		
	
	
		
			feat_shbc
			...
			spelling-f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | c9a2ab44dd | ||
|  | fb29227f9d | ||
|  | 26629a1a68 | ||
|  | db924a9b2e | 
| @@ -1,6 +1,6 @@ | ||||
| cmake_minimum_required (VERSION 3.1) | ||||
|  | ||||
| project (rpc VERSION 1.2.1) | ||||
| project (rpc VERSION 1.3.0) | ||||
|  | ||||
| set (CMAKE_CXX_STANDARD 11) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								info.cpp
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								info.cpp
									
									
									
									
									
								
							| @@ -273,7 +273,7 @@ bool info_get_lan_interface_settings() | ||||
|     bool hasWired = cmd_get_lan_interface_settings(tmp); | ||||
|     if (hasWired) | ||||
|     { | ||||
|         out_text("LAN Inteface", "wired"); | ||||
|         out_text("LAN Interface", "wired"); | ||||
|         out_text("DHCP Enabled", (tmp.dhcp_enabled) ? "true" : "false"); | ||||
|         out_text("DHCP Mode", (tmp.dhcp_mode == 1) ? "active" : "passive"); | ||||
|         out_text("Link Status", (tmp.link_status) ? "up" : "down"); | ||||
| @@ -291,7 +291,7 @@ bool info_get_lan_interface_settings() | ||||
|     bool hasWireless = cmd_get_lan_interface_settings(tmp, false); | ||||
|     if (hasWireless) | ||||
|     { | ||||
|         out_text("LAN Inteface", "wireless"); | ||||
|         out_text("LAN Interface", "wireless"); | ||||
|         out_text("DHCP Enabled", (tmp.dhcp_enabled) ? "true" : "false"); | ||||
|         out_text("DHCP Mode", (tmp.dhcp_mode == 1) ? "active" : "passive"); | ||||
|         out_text("Link Status", (tmp.link_status) ? "up" : "down"); | ||||
|   | ||||
							
								
								
									
										31
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								main.cpp
									
									
									
									
									
								
							| @@ -7,6 +7,7 @@ | ||||
| #include <thread> | ||||
| #include <cpprest/ws_client.h> | ||||
| #include <cpprest/json.h> | ||||
| #include <algorithm> | ||||
| #include "port.h" | ||||
| #include "lms.h" | ||||
| #include "commands.h" | ||||
| @@ -271,7 +272,22 @@ int main(int argc, char* argv[]) | ||||
|                 g_timeout_val = 0; | ||||
|  | ||||
|                 // exit | ||||
|                 try { | ||||
|                     std::cout << std::endl; | ||||
|                     utility::string_t tmp = utility::conversions::convertstring(msgMessage); | ||||
|                     web::json::value parsed = web::json::value::parse(tmp); | ||||
|                     for (const auto& obj : parsed.as_object()) { | ||||
|                         std::string key = utility::conversions::to_utf8string(obj.first); | ||||
|                         std::string value = utility::conversions::to_utf8string(obj.second.serialize()); | ||||
|                         value.erase(std::remove(value.begin(), value.end(), '"'), value.end()); | ||||
|                         std::cout << key << ": " << value << std::endl; | ||||
|                     } | ||||
|                 } | ||||
|                 catch (...) | ||||
|                 { | ||||
|                     std::cout << std::endl << msgMessage << std::endl; | ||||
|                 } | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|             else if (msgStatus.compare("failed")==0) | ||||
| @@ -280,7 +296,22 @@ int main(int argc, char* argv[]) | ||||
|                 g_timeout_val = 0; | ||||
|  | ||||
|                 // exit | ||||
|                 try { | ||||
|                     std::cout << std::endl; | ||||
|                     utility::string_t tmp = utility::conversions::convertstring(msgMessage); | ||||
|                     web::json::value parsed = web::json::value::parse(tmp); | ||||
|                     for (const auto& obj : parsed.as_object()) { | ||||
|                         std::string key = utility::conversions::to_utf8string(obj.first); | ||||
|                         std::string value = utility::conversions::to_utf8string(obj.second.serialize()); | ||||
|                         value.erase(std::remove(value.begin(), value.end(), '"'), value.end()); | ||||
|                         std::cout << key << ": " << value << std::endl; | ||||
|                     } | ||||
|                 } | ||||
|                 catch (...) | ||||
|                 { | ||||
|                     std::cout << std::endl << msgMessage << std::endl; | ||||
|                 } | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user