MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / GetNetworkState

Method GetNetworkState

src/Networking/Network.cpp:672–686  ·  view source on GitHub ↗

Get the network state into the reply buffer, returning true if there is some sort of error

Source from the content-addressed store, hash-verified

670
671// Get the network state into the reply buffer, returning true if there is some sort of error
672GCodeResult Network::GetNetworkState(unsigned int interface, const StringRef& reply) noexcept
673{
674#if HAS_NETWORKING
675 if (interface < GetNumNetworkInterfaces())
676 {
677 return interfaces[interface]->GetNetworkState(reply);
678 }
679
680 reply.printf("Invalid network interface '%d'\n", interface);
681 return GCodeResult::error;
682#else
683 reply.copy(notSupportedText);
684 return GCodeResult::error;
685#endif
686}
687
688bool Network::IsWiFiInterface(unsigned int interface) const noexcept
689{

Callers 1

GCodes2.cppFile · 0.45

Calls 2

copyMethod · 0.80
printfMethod · 0.45

Tested by

no test coverage detected