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

Method EnableProtocol

src/Networking/Network.cpp:244–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242#endif
243
244GCodeResult Network::EnableProtocol(unsigned int interface, NetworkProtocol protocol, int port, uint32_t ip, int secure, const StringRef& reply) noexcept
245{
246#if HAS_NETWORKING
247
248 if (interface < GetNumNetworkInterfaces())
249 {
250 return interfaces[interface]->EnableProtocol(protocol, port, ip, secure, reply);
251 }
252
253 reply.printf("Invalid network interface '%d'\n", interface);
254 return GCodeResult::error;
255#else
256 reply.copy(notSupportedText);
257 return GCodeResult::error;
258#endif
259}
260
261GCodeResult Network::DisableProtocol(unsigned int interface, NetworkProtocol protocol, const StringRef& reply) noexcept
262{

Callers

nothing calls this directly

Calls 2

copyMethod · 0.80
printfMethod · 0.45

Tested by

no test coverage detected