pip micro disable piintrospection piwaitevent
PIP_NO_SOCET
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "pikbdlistener.h"
|
#include "pikbdlistener.h"
|
||||||
|
|
||||||
|
#ifndef MICRO_PIP
|
||||||
|
|
||||||
# include "piincludes_p.h"
|
# include "piincludes_p.h"
|
||||||
# include "piliterals.h"
|
# include "piliterals.h"
|
||||||
# include "piwaitevent_p.h"
|
# include "piwaitevent_p.h"
|
||||||
@@ -587,3 +589,5 @@ void PIKbdListener::setActive(bool yes) {
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // MICRO_PIP
|
||||||
|
|||||||
@@ -26,6 +26,10 @@
|
|||||||
#ifndef PIKBDLISTENER_H
|
#ifndef PIKBDLISTENER_H
|
||||||
#define PIKBDLISTENER_H
|
#define PIKBDLISTENER_H
|
||||||
|
|
||||||
|
#include "pibase.h"
|
||||||
|
|
||||||
|
#ifndef MICRO_PIP
|
||||||
|
|
||||||
# include "pithread.h"
|
# include "pithread.h"
|
||||||
# include "pitime.h"
|
# include "pitime.h"
|
||||||
|
|
||||||
@@ -305,4 +309,5 @@ REGISTER_PIVARIANTSIMPLE(PIKbdListener::KeyEvent)
|
|||||||
REGISTER_PIVARIANTSIMPLE(PIKbdListener::MouseEvent)
|
REGISTER_PIVARIANTSIMPLE(PIKbdListener::MouseEvent)
|
||||||
REGISTER_PIVARIANTSIMPLE(PIKbdListener::WheelEvent)
|
REGISTER_PIVARIANTSIMPLE(PIKbdListener::WheelEvent)
|
||||||
|
|
||||||
|
#endif // MICRO_PIP
|
||||||
#endif // PIKBDLISTENER_H
|
#endif // PIKBDLISTENER_H
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "piwaitevent_p.h"
|
#include "piwaitevent_p.h"
|
||||||
|
#ifndef MICRO_PIP
|
||||||
# ifdef WINDOWS
|
# ifdef WINDOWS
|
||||||
// # ifdef _WIN32_WINNT
|
// # ifdef _WIN32_WINNT
|
||||||
// # undef _WIN32_WINNT
|
// # undef _WIN32_WINNT
|
||||||
@@ -151,3 +152,5 @@ void * PIWaitEvent::getEvent() const {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // MICRO_PIP
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#ifndef PIWAITEVENT_P_H
|
#ifndef PIWAITEVENT_P_H
|
||||||
#define PIWAITEVENT_P_H
|
#define PIWAITEVENT_P_H
|
||||||
|
|
||||||
|
#ifndef MICRO_PIP
|
||||||
|
|
||||||
# include "pibase.h"
|
# include "pibase.h"
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
@@ -65,4 +67,5 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // MICRO_PIP
|
||||||
#endif // PIWAITEVENT_P_H
|
#endif // PIWAITEVENT_P_H
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include "piintrospection_server_p.h"
|
#include "piintrospection_server_p.h"
|
||||||
|
|
||||||
|
#if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|
||||||
# include "pichunkstream.h"
|
# include "pichunkstream.h"
|
||||||
# include "piinit.h"
|
# include "piinit.h"
|
||||||
# include "piobject.h"
|
# include "piobject.h"
|
||||||
@@ -170,3 +172,5 @@ void PIIntrospection::unpackObjects(PIByteArray & ba, PIVector<PIIntrospection::
|
|||||||
objects.clear();
|
objects.clear();
|
||||||
ba >> objects;
|
ba >> objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "piintrospection_threads_p.h"
|
#include "piintrospection_threads_p.h"
|
||||||
#include "pisystemmonitor.h"
|
#include "pisystemmonitor.h"
|
||||||
|
|
||||||
|
#if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|
||||||
class PIP_EXPORT PIIntrospection {
|
class PIP_EXPORT PIIntrospection {
|
||||||
public:
|
public:
|
||||||
@@ -168,4 +169,5 @@ BINARY_STREAM_READ(PIIntrospection::ObjectInfo) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
#endif // PIINTROSPECTION_SERVER_P_H
|
#endif // PIINTROSPECTION_SERVER_P_H
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "piintrospection_threads_p.h"
|
#include "piintrospection_threads_p.h"
|
||||||
|
|
||||||
|
#if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|
||||||
PIIntrospectionThreads::ThreadInfo::ThreadInfo() {
|
PIIntrospectionThreads::ThreadInfo::ThreadInfo() {
|
||||||
id = delay = 0;
|
id = delay = 0;
|
||||||
@@ -78,3 +79,5 @@ void PIIntrospectionThreads::threadRunDone(PIThread * t, ullong us) {
|
|||||||
ThreadInfo & ti(threads[t]);
|
ThreadInfo & ti(threads[t]);
|
||||||
ti.run_us = (ti.run_us * 0.8) + (us * 0.2); /// WARNING
|
ti.run_us = (ti.run_us * 0.8) + (us * 0.2); /// WARNING
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
#ifndef PIINTROSPECTION_THREADS_P_H
|
#ifndef PIINTROSPECTION_THREADS_P_H
|
||||||
#define PIINTROSPECTION_THREADS_P_H
|
#define PIINTROSPECTION_THREADS_P_H
|
||||||
|
|
||||||
|
#include "pibase.h"
|
||||||
|
|
||||||
|
#if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
|
|
||||||
#include "pimap.h"
|
#include "pimap.h"
|
||||||
#include "pithread.h"
|
#include "pithread.h"
|
||||||
|
|
||||||
@@ -68,4 +72,5 @@ BINARY_STREAM_READ(PIIntrospectionThreads::ThreadInfo) {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(PIP_INTROSPECTION) && !defined(PIP_FORCE_NO_PIINTROSPECTION)
|
||||||
#endif // PIINTROSPECTION_THREADS_P_H
|
#endif // PIINTROSPECTION_THREADS_P_H
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "pipropertystorage.h"
|
#include "pipropertystorage.h"
|
||||||
#include "piwaitevent_p.h"
|
#include "piwaitevent_p.h"
|
||||||
#if !defined(WINDOWS) && !defined(MAC_OS) && !defined(MICRO_PIP)
|
#if !defined(WINDOWS) && !defined(MAC_OS) && !defined(PIP_NO_SOCKET)
|
||||||
# define PIP_CAN
|
# define PIP_CAN
|
||||||
#endif
|
#endif
|
||||||
#ifdef PIP_CAN
|
#ifdef PIP_CAN
|
||||||
@@ -39,25 +39,29 @@
|
|||||||
|
|
||||||
REGISTER_DEVICE(PICAN)
|
REGISTER_DEVICE(PICAN)
|
||||||
|
|
||||||
|
#ifdef PIP_CAN
|
||||||
PRIVATE_DEFINITION_START(PICAN)
|
PRIVATE_DEFINITION_START(PICAN)
|
||||||
PIWaitEvent event;
|
PIWaitEvent event;
|
||||||
PRIVATE_DEFINITION_END(PICAN)
|
PRIVATE_DEFINITION_END(PICAN)
|
||||||
|
#endif
|
||||||
|
|
||||||
PICAN::PICAN(const PIString & path, PIIODevice::DeviceMode mode): PIIODevice(path, mode) {
|
PICAN::PICAN(const PIString & path, PIIODevice::DeviceMode mode): PIIODevice(path, mode) {
|
||||||
setThreadedReadBufferSize(256);
|
setThreadedReadBufferSize(256);
|
||||||
setPath(path);
|
setPath(path);
|
||||||
|
#ifdef PIP_CAN
|
||||||
can_id = 0;
|
can_id = 0;
|
||||||
sock = 0;
|
sock = 0;
|
||||||
PRIVATE->event.create();
|
PRIVATE->event.create();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PICAN::~PICAN() {
|
PICAN::~PICAN() {
|
||||||
stopAndWait();
|
stopAndWait();
|
||||||
close();
|
close();
|
||||||
|
#ifdef PIP_CAN
|
||||||
PRIVATE->event.destroy();
|
PRIVATE->event.destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +168,9 @@ int PICAN::readedCANID() const {
|
|||||||
|
|
||||||
|
|
||||||
void PICAN::interrupt() {
|
void PICAN::interrupt() {
|
||||||
|
#ifdef PIP_CAN
|
||||||
PRIVATE->event.interrupt();
|
PRIVATE->event.interrupt();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "piethernet.h"
|
#include "piethernet.h"
|
||||||
|
|
||||||
|
#ifndef PIP_NO_SOCKET
|
||||||
|
|
||||||
# include "piconfig.h"
|
# include "piconfig.h"
|
||||||
# include "piconstchars.h"
|
# include "piconstchars.h"
|
||||||
# include "piincludes_p.h"
|
# include "piincludes_p.h"
|
||||||
@@ -25,7 +27,7 @@
|
|||||||
# include "pipropertystorage.h"
|
# include "pipropertystorage.h"
|
||||||
# include "pisysteminfo.h"
|
# include "pisysteminfo.h"
|
||||||
# include "pitranslator.h"
|
# include "pitranslator.h"
|
||||||
// clang-format off
|
|
||||||
# ifdef QNX
|
# ifdef QNX
|
||||||
# include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
@@ -49,21 +51,21 @@
|
|||||||
# else
|
# else
|
||||||
# ifdef WINDOWS
|
# ifdef WINDOWS
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <winsock2.h>
|
|
||||||
# include <iphlpapi.h>
|
# include <iphlpapi.h>
|
||||||
# include <psapi.h>
|
# include <psapi.h>
|
||||||
|
# include <winsock2.h>
|
||||||
# include <ws2tcpip.h>
|
# include <ws2tcpip.h>
|
||||||
# define ip_mreqn ip_mreq
|
# define ip_mreqn ip_mreq
|
||||||
# define imr_address imr_interface
|
# define imr_address imr_interface
|
||||||
# else
|
# else
|
||||||
|
# include <arpa/inet.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <sys/ioctl.h>
|
# include <net/if.h>
|
||||||
|
# include <netdb.h>
|
||||||
# include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
# include <netinet/tcp.h>
|
# include <netinet/tcp.h>
|
||||||
# include <arpa/inet.h>
|
# include <sys/ioctl.h>
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
# include <netdb.h>
|
|
||||||
# include <net/if.h>
|
|
||||||
# if !defined(ANDROID) && !defined(LWIP)
|
# if !defined(ANDROID) && !defined(LWIP)
|
||||||
# include <ifaddrs.h>
|
# include <ifaddrs.h>
|
||||||
# endif
|
# endif
|
||||||
@@ -72,7 +74,6 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
// clang-format on
|
|
||||||
# include "piwaitevent_p.h"
|
# include "piwaitevent_p.h"
|
||||||
|
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
@@ -196,7 +197,7 @@ void PIEthernet::construct() {
|
|||||||
setMulticastTTL(1);
|
setMulticastTTL(1);
|
||||||
server_thread_.setData(this);
|
server_thread_.setData(this);
|
||||||
server_thread_.setName("_S.tcpserver"_a);
|
server_thread_.setName("_S.tcpserver"_a);
|
||||||
#ifdef MICRO_PIP
|
# ifdef LWIP
|
||||||
setThreadedReadBufferSize(512);
|
setThreadedReadBufferSize(512);
|
||||||
# else
|
# else
|
||||||
setThreadedReadBufferSize(64_KiB);
|
setThreadedReadBufferSize(64_KiB);
|
||||||
@@ -1170,7 +1171,7 @@ PIEthernet::InterfaceList PIEthernet::interfaces() {
|
|||||||
}
|
}
|
||||||
if (pAdapterInfo) HeapFree(GetProcessHeap(), 0, pAdapterInfo);
|
if (pAdapterInfo) HeapFree(GetProcessHeap(), 0, pAdapterInfo);
|
||||||
# else
|
# else
|
||||||
# ifdef MICRO_PIP
|
# ifdef LWIP
|
||||||
# else
|
# else
|
||||||
# ifdef ANDROID
|
# ifdef ANDROID
|
||||||
struct ifconf ifc;
|
struct ifconf ifc;
|
||||||
@@ -1282,7 +1283,7 @@ PIEthernet::InterfaceList PIEthernet::interfaces() {
|
|||||||
|
|
||||||
|
|
||||||
PINetworkAddress PIEthernet::interfaceAddress(const PIString & interface_) {
|
PINetworkAddress PIEthernet::interfaceAddress(const PIString & interface_) {
|
||||||
#if defined(WINDOWS) || defined(MICRO_PIP)
|
# if defined(WINDOWS) || defined(LWIP)
|
||||||
piCout << "[PIEthernet] Not implemented, use \"PIEthernet::allAddresses\" or \"PIEthernet::interfaces\" instead";
|
piCout << "[PIEthernet] Not implemented, use \"PIEthernet::allAddresses\" or \"PIEthernet::interfaces\" instead";
|
||||||
return PINetworkAddress();
|
return PINetworkAddress();
|
||||||
# else
|
# else
|
||||||
@@ -1486,3 +1487,5 @@ bool PIEthernet::ethIsWriteable(int sock) {
|
|||||||
return ret == 0;
|
return ret == 0;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // PIP_NO_SOCKET
|
||||||
|
|||||||
@@ -26,9 +26,12 @@
|
|||||||
#ifndef PIETHERNET_H
|
#ifndef PIETHERNET_H
|
||||||
#define PIETHERNET_H
|
#define PIETHERNET_H
|
||||||
|
|
||||||
|
|
||||||
#include "piiodevice.h"
|
#include "piiodevice.h"
|
||||||
#include "pinetworkaddress.h"
|
#include "pinetworkaddress.h"
|
||||||
|
|
||||||
|
#ifndef PIP_NO_SOCKET
|
||||||
|
|
||||||
# ifdef ANDROID
|
# ifdef ANDROID
|
||||||
struct
|
struct
|
||||||
# else
|
# else
|
||||||
@@ -536,4 +539,5 @@ inline bool operator!=(const PIEthernet::Interface & v0, const PIEthernet::Inter
|
|||||||
return (v0.name != v1.name || v0.address != v1.address || v0.netmask != v1.netmask);
|
return (v0.name != v1.name || v0.address != v1.address || v0.netmask != v1.netmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // PIP_NO_SOCKET
|
||||||
#endif // PIETHERNET_H
|
#endif // PIETHERNET_H
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
# include <utime.h>
|
# include <utime.h>
|
||||||
#endif
|
#endif
|
||||||
#define S_IFHDN 0x40
|
#define S_IFHDN 0x40
|
||||||
#if defined(QNX) || defined(ANDROID) || defined(FREERTOS)
|
#if defined(QNX) || defined(ANDROID) || defined(MICRO_PIP)
|
||||||
# define _fopen_call_ fopen
|
# define _fopen_call_ fopen
|
||||||
# define _fseek_call_ fseek
|
# define _fseek_call_ fseek
|
||||||
# define _ftell_call_ ftell
|
# define _ftell_call_ ftell
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include "piserial.h"
|
#include "piserial.h"
|
||||||
|
|
||||||
|
#ifndef MICRO_PIP
|
||||||
|
|
||||||
# include "piconfig.h"
|
# include "piconfig.h"
|
||||||
# include "pidir.h"
|
# include "pidir.h"
|
||||||
# include "piincludes_p.h"
|
# include "piincludes_p.h"
|
||||||
@@ -29,9 +31,6 @@
|
|||||||
|
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
#if defined(MICRO_PIP)
|
|
||||||
# define PISERIAL_NO_PINS
|
|
||||||
#endif
|
|
||||||
# if defined(PISERIAL_NO_PINS) || defined(WINDOWS)
|
# if defined(PISERIAL_NO_PINS) || defined(WINDOWS)
|
||||||
# define TIOCM_LE 1
|
# define TIOCM_LE 1
|
||||||
# define TIOCM_DTR 4
|
# define TIOCM_DTR 4
|
||||||
@@ -1318,3 +1317,5 @@ void PISerial::threadedReadBufferSizeChanged() {
|
|||||||
// piCoutObj << "a" << ss.xmit_fifo_size;
|
// piCoutObj << "a" << ss.xmit_fifo_size;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // MICRO_PIP
|
||||||
|
|||||||
@@ -55,6 +55,10 @@
|
|||||||
# ifndef FREERTOS
|
# ifndef FREERTOS
|
||||||
# define PIP_NO_THREADS
|
# define PIP_NO_THREADS
|
||||||
# endif
|
# endif
|
||||||
|
# ifndef LWIP
|
||||||
|
# define PIP_NO_SOCKET
|
||||||
|
# endif
|
||||||
|
# define PISERIAL_NO_PINS
|
||||||
#endif
|
#endif
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
# ifndef QNX
|
# ifndef QNX
|
||||||
|
|||||||
Reference in New Issue
Block a user